Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: various fixes (mostly bash 5 related) #3554

Merged
merged 6 commits into from
Feb 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/test/libpmempool_api/TEST9
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/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
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -51,7 +51,7 @@ rm -f $LOG_TEMP && touch $LOG_TEMP
declare -A pool_args=(["log"]="log"
["blk"]="blk 512")

for field in "${!pool_args[@]}";
for field in log blk;
do
echo "Pool type: ${field} Params: ${pool_args["$field"]}" >> $LOG_TEMP
expect_normal_exit $PMEMPOOL$EXESUFFIX create\
Expand Down
4 changes: 3 additions & 1 deletion src/test/magic/TEST0
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/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
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -44,6 +44,8 @@ require_build_type nondebug
# because even if it does report any problems we can't fix it
configure_valgrind force-disable

require_command file

setup

POOL=$DIR/file.pool
Expand Down
4 changes: 2 additions & 2 deletions src/test/pmempool_info/TEST26
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright 2018, Intel Corporation
# Copyright 2018-2019, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -48,7 +48,7 @@ LOG=out${UNITTEST_NUM}.log
expect_normal_exit $PMEMPOOL$EXESUFFIX create --layout "pmempool$SUFFIX" obj\
$POOL
expect_normal_exit $PMEMSPOIL $POOL \
"pool_hdr.shutdown_state.dirty=1
"pool_hdr.shutdown_state.dirty=1 \
pool_hdr.shutdown_state.checksum_gen\(\)"
expect_normal_exit $PMEMPOOL$EXESUFFIX info $POOL >> $LOG

Expand Down
12 changes: 5 additions & 7 deletions src/test/rpmemd_config/TEST4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/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
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -54,21 +54,19 @@ EMPTY_CONFIG=$DIR/empty.conf
touch $EMPTY_CONFIG

function check_user_home_dir {
HOME_STR=\\\$HOME

expect_normal_exit $RPMEMD -c $EMPTY_CONFIG print_HOME_env
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

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

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

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
}

Expand Down
8 changes: 4 additions & 4 deletions src/test/unittest/unittest.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2014-2018, Intel Corporation
# Copyright 2014-2019, Intel Corporation
# Copyright (c) 2016, Microsoft Corporation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -828,7 +828,7 @@ function expect_normal_exit() {
disable_exit_on_error

eval $ECHO LD_LIBRARY_PATH=$TEST_LD_LIBRARY_PATH LD_PRELOAD=$TEST_LD_PRELOAD \
$trace $*
$trace "$*"
ret=$?

if [ $REMOTE_VALGRIND_LOG -eq 1 ]; then
Expand Down Expand Up @@ -935,7 +935,7 @@ function expect_abnormal_exit() {

disable_exit_on_error
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=$?
restore_exit_on_error

Expand Down Expand Up @@ -1496,7 +1496,7 @@ function require_fs_name() {
fi
done

echo "$UNITTEST_NAME: SKIP file system $fsname ($* required)"
msg "$UNITTEST_NAME: SKIP file system $fsname ($* required)"
exit 0
}

Expand Down