Skip to content
Snippets Groups Projects
Unverified Commit 1ef871f5 authored by Marcin Ślusarz's avatar Marcin Ślusarz Committed by GitHub
Browse files

Merge pull request #3554 from marcinslusarz/fixes

test: various fixes (mostly bash 5 related)
parents 9aed620b a330048a
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env bash #!/usr/bin/env bash
# #
# Copyright 2016-2018, Intel Corporation # Copyright 2016-2019, Intel Corporation
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions # modification, are permitted provided that the following conditions
...@@ -51,7 +51,7 @@ rm -f $LOG_TEMP && touch $LOG_TEMP ...@@ -51,7 +51,7 @@ rm -f $LOG_TEMP && touch $LOG_TEMP
declare -A pool_args=(["log"]="log" declare -A pool_args=(["log"]="log"
["blk"]="blk 512") ["blk"]="blk 512")
for field in "${!pool_args[@]}"; for field in log blk;
do do
echo "Pool type: ${field} Params: ${pool_args["$field"]}" >> $LOG_TEMP echo "Pool type: ${field} Params: ${pool_args["$field"]}" >> $LOG_TEMP
expect_normal_exit $PMEMPOOL$EXESUFFIX create\ expect_normal_exit $PMEMPOOL$EXESUFFIX create\
......
#!/usr/bin/env bash #!/usr/bin/env bash
# #
# Copyright 2014-2018, Intel Corporation # Copyright 2014-2019, Intel Corporation
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions # modification, are permitted provided that the following conditions
...@@ -44,6 +44,8 @@ require_build_type nondebug ...@@ -44,6 +44,8 @@ require_build_type nondebug
# because even if it does report any problems we can't fix it # because even if it does report any problems we can't fix it
configure_valgrind force-disable configure_valgrind force-disable
require_command file
setup setup
POOL=$DIR/file.pool POOL=$DIR/file.pool
......
#!/usr/bin/env bash #!/usr/bin/env bash
# #
# Copyright 2018, Intel Corporation # Copyright 2018-2019, Intel Corporation
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions # modification, are permitted provided that the following conditions
...@@ -48,7 +48,7 @@ LOG=out${UNITTEST_NUM}.log ...@@ -48,7 +48,7 @@ LOG=out${UNITTEST_NUM}.log
expect_normal_exit $PMEMPOOL$EXESUFFIX create --layout "pmempool$SUFFIX" obj\ expect_normal_exit $PMEMPOOL$EXESUFFIX create --layout "pmempool$SUFFIX" obj\
$POOL $POOL
expect_normal_exit $PMEMSPOIL $POOL \ expect_normal_exit $PMEMSPOIL $POOL \
"pool_hdr.shutdown_state.dirty=1 "pool_hdr.shutdown_state.dirty=1 \
pool_hdr.shutdown_state.checksum_gen\(\)" pool_hdr.shutdown_state.checksum_gen\(\)"
expect_normal_exit $PMEMPOOL$EXESUFFIX info $POOL >> $LOG expect_normal_exit $PMEMPOOL$EXESUFFIX info $POOL >> $LOG
......
#!/usr/bin/env bash #!/usr/bin/env bash
# #
# Copyright 2016-2018, Intel Corporation # Copyright 2016-2019, Intel Corporation
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions # modification, are permitted provided that the following conditions
...@@ -54,21 +54,19 @@ EMPTY_CONFIG=$DIR/empty.conf ...@@ -54,21 +54,19 @@ EMPTY_CONFIG=$DIR/empty.conf
touch $EMPTY_CONFIG touch $EMPTY_CONFIG
function check_user_home_dir { function check_user_home_dir {
HOME_STR=\\\$HOME
expect_normal_exit $RPMEMD -c $EMPTY_CONFIG print_HOME_env expect_normal_exit $RPMEMD -c $EMPTY_CONFIG print_HOME_env
cat $LOG >> $LOG_TEMP cat $LOG >> $LOG_TEMP
expect_normal_exit $RPMEMD -c $EMPTY_CONFIG --poolset-dir=$HOME_STR print_HOME_env expect_normal_exit $RPMEMD -c $EMPTY_CONFIG --poolset-dir='\$HOME' print_HOME_env
cat $LOG >> $LOG_TEMP cat $LOG >> $LOG_TEMP
expect_normal_exit $RPMEMD -c $EMPTY_CONFIG --poolset-dir=prefix$HOME_STR print_HOME_env expect_normal_exit $RPMEMD -c $EMPTY_CONFIG --poolset-dir=prefix'\$HOME' print_HOME_env
cat $LOG >> $LOG_TEMP cat $LOG >> $LOG_TEMP
expect_normal_exit $RPMEMD -c $EMPTY_CONFIG --poolset-dir=${HOME_STR}stickysuffix print_HOME_env expect_normal_exit $RPMEMD -c $EMPTY_CONFIG --poolset-dir='\$HOME'stickysuffix print_HOME_env
cat $LOG >> $LOG_TEMP cat $LOG >> $LOG_TEMP
expect_normal_exit $RPMEMD -c $EMPTY_CONFIG --poolset-dir=${HOME_STR}/suffix print_HOME_env expect_normal_exit $RPMEMD -c $EMPTY_CONFIG --poolset-dir='\$HOME'/suffix print_HOME_env
cat $LOG >> $LOG_TEMP cat $LOG >> $LOG_TEMP
} }
......
# #
# Copyright 2014-2018, Intel Corporation # Copyright 2014-2019, Intel Corporation
# Copyright (c) 2016, Microsoft Corporation. All rights reserved. # Copyright (c) 2016, Microsoft Corporation. All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
...@@ -828,7 +828,7 @@ function expect_normal_exit() { ...@@ -828,7 +828,7 @@ function expect_normal_exit() {
disable_exit_on_error disable_exit_on_error
eval $ECHO LD_LIBRARY_PATH=$TEST_LD_LIBRARY_PATH LD_PRELOAD=$TEST_LD_PRELOAD \ eval $ECHO LD_LIBRARY_PATH=$TEST_LD_LIBRARY_PATH LD_PRELOAD=$TEST_LD_PRELOAD \
$trace $* $trace "$*"
ret=$? ret=$?
if [ $REMOTE_VALGRIND_LOG -eq 1 ]; then if [ $REMOTE_VALGRIND_LOG -eq 1 ]; then
...@@ -935,7 +935,7 @@ function expect_abnormal_exit() { ...@@ -935,7 +935,7 @@ function expect_abnormal_exit() {
disable_exit_on_error disable_exit_on_error
eval $ECHO ASAN_OPTIONS="detect_leaks=0 ${ASAN_OPTIONS}" \ eval $ECHO ASAN_OPTIONS="detect_leaks=0 ${ASAN_OPTIONS}" \
LD_LIBRARY_PATH=$TEST_LD_LIBRARY_PATH LD_PRELOAD=$TEST_LD_PRELOAD $TRACE $* LD_LIBRARY_PATH=$TEST_LD_LIBRARY_PATH LD_PRELOAD=$TEST_LD_PRELOAD $TRACE "$*"
ret=$? ret=$?
restore_exit_on_error restore_exit_on_error
...@@ -1496,7 +1496,7 @@ function require_fs_name() { ...@@ -1496,7 +1496,7 @@ function require_fs_name() {
fi fi
done done
echo "$UNITTEST_NAME: SKIP file system $fsname ($* required)" msg "$UNITTEST_NAME: SKIP file system $fsname ($* required)"
exit 0 exit 0
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment