From: James Nunez Date: Thu, 30 Jul 2020 22:33:32 +0000 (-0600) Subject: LU-13773 tests: use TESTLOG_PREFIX in run_one_logged X-Git-Tag: 2.13.56~91 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=cf6ac632a18c3acb3534cd07b717673997a58515 LU-13773 tests: use TESTLOG_PREFIX in run_one_logged TESTLOG_PREFIX is defined and exported in init_test_env() in test-framework.sh. This environment variable is defined as $LOGDIR/$TESTSUITE. TESTLOG_PREFIX should be used in the definitions of test_log and zfs_debug_log. Since the logs created in run_one_logged() don't use the defined prefix, this could lead to differences in the naming of the dmesg, debug_log and test_log logs. Let's use TESTLOG_PREFIX in the definitions of test_log and zfs_debug_log so that changes to the prefix are reflected in all logs. Signed-off-by: James Nunez Change-Id: I14dbe0469b7a6627d63679103c235b97f0e42b67 Reviewed-on: https://review.whamcloud.com/39552 Tested-by: jenkins Reviewed-by: Wei Liu Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 65aeb10..aa320f2 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -6545,10 +6545,8 @@ run_one_logged() { local testmsg=$2 export tfile=f${testnum}.${TESTSUITE} export tdir=d${testnum}.${TESTSUITE} - local name=$TESTSUITE.$TESTNAME.test_log.$(hostname -s).log - local test_log=$LOGDIR/$name - local zfs_log_name=$TESTSUITE.$TESTNAME.zfs_log - local zfs_debug_log=$LOGDIR/$zfs_log_name + local test_log=$TESTLOG_PREFIX.$TESTNAME.test_log.$(hostname -s).log + local zfs_debug_log=$TESTLOG_PREFIX.$TESTNAME.zfs_log local SAVE_UMASK=$(umask) local rc=0 umask 0022