From 60f29e3c40f863c5aa177292468a5fbe0e4bb9da Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Tue, 20 Jun 2023 12:57:56 -0600 Subject: [PATCH] LU-16804 tests: rename 'complete' to 'complete_test' The test-framework.sh "complete" function conflicts with "complete" exported from bash_completion, and this causes lustre-initialization to fail in some configurations now that the lustre test config is loaded earlier during test-framework.sh init_test_env() setup. Rename "complete" to "complete_test" to avoid this conflict. Lustre-change: https://review.whamcloud.com/51383 Lustre-commit: TBD (from 9bf8d1944995e7bf627a602aa1d0523d810c84b6) Test-Parameters: trivial Fixes: fdbb2bc849 ("LU-16804 tests: load CONFIG at beginning of init_test_env") Signed-off-by: Andreas Dilger Change-Id: Ic72d8d5cc4a65feec6bfb2a76ac5f9b9d78e3f75 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51389 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Charlie Olmstead --- lustre/tests/conf-sanity.sh | 2 +- lustre/tests/dne_sanity.sh | 2 +- lustre/tests/dom-performance.sh | 2 +- lustre/tests/hot-pools.sh | 2 +- lustre/tests/insanity.sh | 2 +- lustre/tests/large-lun.sh | 2 +- lustre/tests/large-scale.sh | 2 +- lustre/tests/lfsck-performance.sh | 2 +- lustre/tests/lnet-selftest.sh | 2 +- lustre/tests/lustre-rsync-test.sh | 2 +- lustre/tests/mds-survey.sh | 2 +- lustre/tests/mdsrate-create-small.sh | 2 +- lustre/tests/mdsrate-lookup-10dirs.sh | 2 +- lustre/tests/mdsrate-lookup-1dir.sh | 2 +- lustre/tests/mdsrate-stat-large.sh | 2 +- lustre/tests/mdsrate-stat-small.sh | 2 +- lustre/tests/metadata-updates.sh | 2 +- lustre/tests/mmp.sh | 2 +- lustre/tests/obdfilter-survey.sh | 2 +- lustre/tests/ost-pools.sh | 2 +- lustre/tests/parallel-scale-cifs.sh | 2 +- lustre/tests/parallel-scale-nfs.sh | 2 +- lustre/tests/parallel-scale.sh | 2 +- lustre/tests/performance-sanity.sh | 2 +- lustre/tests/pjdfstest.sh | 2 +- lustre/tests/posix.sh | 2 +- lustre/tests/racer.sh | 2 +- lustre/tests/recovery-double-scale.sh | 2 +- lustre/tests/recovery-mds-scale.sh | 2 +- lustre/tests/recovery-random-scale.sh | 2 +- lustre/tests/recovery-small.sh | 2 +- lustre/tests/replay-dual.sh | 4 ++-- lustre/tests/replay-ost-single.sh | 2 +- lustre/tests/replay-single-lmv.sh | 2 +- lustre/tests/replay-single.sh | 2 +- lustre/tests/replay-vbr.sh | 2 +- lustre/tests/runtests | 2 +- lustre/tests/sanity-benchmark.sh | 2 +- lustre/tests/sanity-dom.sh | 2 +- lustre/tests/sanity-flr.sh | 2 +- lustre/tests/sanity-gss.sh | 2 +- lustre/tests/sanity-hsm.sh | 2 +- lustre/tests/sanity-krb5.sh | 2 +- lustre/tests/sanity-laudit.sh | 2 +- lustre/tests/sanity-lfsck.sh | 2 +- lustre/tests/sanity-lipe-find3.sh | 2 +- lustre/tests/sanity-lipe-scan3.sh | 2 +- lustre/tests/sanity-lipe.sh | 2 +- lustre/tests/sanity-lnet.sh | 3 +-- lustre/tests/sanity-lsnapshot.sh | 2 +- lustre/tests/sanity-pcc.sh | 2 +- lustre/tests/sanity-pfl.sh | 2 +- lustre/tests/sanity-pumount.sh | 2 +- lustre/tests/sanity-quota.sh | 2 +- lustre/tests/sanity-scrub.sh | 2 +- lustre/tests/sanity-sec.sh | 2 +- lustre/tests/sanity-selinux.sh | 2 +- lustre/tests/sanity.sh | 3 +-- lustre/tests/sanityn.sh | 2 +- lustre/tests/scrub-performance.sh | 2 +- lustre/tests/sgpdd-survey.sh | 2 +- lustre/tests/test-framework.sh | 10 +++++----- 62 files changed, 67 insertions(+), 69 deletions(-) diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 1c3d58a..cd2860c 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -9719,6 +9719,6 @@ MDSSIZE=$STORED_MDSSIZE OSTSIZE=$STORED_OSTSIZE reformat -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/dne_sanity.sh b/lustre/tests/dne_sanity.sh index adce2e7..823249e 100644 --- a/lustre/tests/dne_sanity.sh +++ b/lustre/tests/dne_sanity.sh @@ -97,6 +97,6 @@ run_test sanity "Run sanity parallel on different directories at the same time" cleanup_running_directories || error "unlink running directories" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/dom-performance.sh b/lustre/tests/dom-performance.sh index 1dd5a7a..67ce5bb 100644 --- a/lustre/tests/dom-performance.sh +++ b/lustre/tests/dom-performance.sh @@ -428,6 +428,6 @@ run_test compbench "Performance comparision: compilebench" FAIL_ON_ERROR=$SAVED_FAIL_ON_ERROR $LCTL set_param -n debug="$SAVED_DEBUG" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/hot-pools.sh b/lustre/tests/hot-pools.sh index 58b9719..8085404 100755 --- a/lustre/tests/hot-pools.sh +++ b/lustre/tests/hot-pools.sh @@ -2338,6 +2338,6 @@ test_74() { } run_test 74 "ofd keepalive message" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/insanity.sh b/lustre/tests/insanity.sh index 917c23c..6ad31fe 100755 --- a/lustre/tests/insanity.sh +++ b/lustre/tests/insanity.sh @@ -746,6 +746,6 @@ test_14() { } run_test 14 "Fourteen Failure Mode: OST0,OST1/CLIENTS/MDS0,MDS1 `date`" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/large-lun.sh b/lustre/tests/large-lun.sh index 153d0bb..4873151 100644 --- a/lustre/tests/large-lun.sh +++ b/lustre/tests/large-lun.sh @@ -331,7 +331,7 @@ test_4 () { } run_test 4 "run llverfs on lustre filesystem" -complete $SECONDS +complete_test $SECONDS $LARGE_LUN_RESTORE_MOUNT && setupall check_and_cleanup_lustre exit_status diff --git a/lustre/tests/large-scale.sh b/lustre/tests/large-scale.sh index 7973edb..f741079 100644 --- a/lustre/tests/large-scale.sh +++ b/lustre/tests/large-scale.sh @@ -108,6 +108,6 @@ test_3a() { run_test 3a "recovery time, $CLIENTCOUNT clients" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/lfsck-performance.sh b/lustre/tests/lfsck-performance.sh index dbbf3fe..2970bc84 100644 --- a/lustre/tests/lfsck-performance.sh +++ b/lustre/tests/lfsck-performance.sh @@ -1028,6 +1028,6 @@ run_test 8 "lfsck namespace impact on create performance" # cleanup the system at last lfsck_cleanup -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/lnet-selftest.sh b/lustre/tests/lnet-selftest.sh index 045ff4a..b4fcaa1 100755 --- a/lustre/tests/lnet-selftest.sh +++ b/lustre/tests/lnet-selftest.sh @@ -208,7 +208,7 @@ test_smoke () { } run_test smoke "lst regression test" -complete $SECONDS +complete_test $SECONDS _restore_mount check_and_cleanup_lustre exit_status diff --git a/lustre/tests/lustre-rsync-test.sh b/lustre/tests/lustre-rsync-test.sh index b16979e..5382ea6 100644 --- a/lustre/tests/lustre-rsync-test.sh +++ b/lustre/tests/lustre-rsync-test.sh @@ -675,6 +675,6 @@ test_9() { run_test 9 "Replicate recursive directory removal" cd $ORIG_PWD -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/mds-survey.sh b/lustre/tests/mds-survey.sh index 93715b2..ba0ed1b 100644 --- a/lustre/tests/mds-survey.sh +++ b/lustre/tests/mds-survey.sh @@ -127,7 +127,7 @@ run_test 2 "Metadata survey with stripe_count = 1" # remount the clients restore_mount $MOUNT -complete $SECONDS +complete_test $SECONDS cleanup_echo_devs check_and_cleanup_lustre exit_status diff --git a/lustre/tests/mdsrate-create-small.sh b/lustre/tests/mdsrate-create-small.sh index 2e87c66..452117e 100644 --- a/lustre/tests/mdsrate-create-small.sh +++ b/lustre/tests/mdsrate-create-small.sh @@ -148,7 +148,7 @@ else fi fi -complete $SECONDS +complete_test $SECONDS rmdir $BASEDIR || true rm -f $MACHINEFILE check_and_cleanup_lustre diff --git a/lustre/tests/mdsrate-lookup-10dirs.sh b/lustre/tests/mdsrate-lookup-10dirs.sh index 7dd3c59..49379a0 100644 --- a/lustre/tests/mdsrate-lookup-10dirs.sh +++ b/lustre/tests/mdsrate-lookup-10dirs.sh @@ -129,7 +129,7 @@ else fi fi -complete $SECONDS +complete_test $SECONDS mdsrate_cleanup_all rmdir $BASEDIR || true rm -f $MACHINEFILE diff --git a/lustre/tests/mdsrate-lookup-1dir.sh b/lustre/tests/mdsrate-lookup-1dir.sh index 221a405..7ddb15e 100644 --- a/lustre/tests/mdsrate-lookup-1dir.sh +++ b/lustre/tests/mdsrate-lookup-1dir.sh @@ -115,7 +115,7 @@ else fi fi -complete $SECONDS +complete_test $SECONDS mdsrate_cleanup $NUM_CLIENTS $MACHINEFILE $NUM_FILES $TESTDIR 'f%%d' rmdir $BASEDIR || true rm -f $MACHINEFILE diff --git a/lustre/tests/mdsrate-stat-large.sh b/lustre/tests/mdsrate-stat-large.sh index 12e7a8c..8dc82d6 100644 --- a/lustre/tests/mdsrate-stat-large.sh +++ b/lustre/tests/mdsrate-stat-large.sh @@ -120,7 +120,7 @@ else fi -complete $SECONDS +complete_test $SECONDS mdsrate_cleanup $NUM_CLIENTS $MACHINEFILE $NUM_FILES $TESTDIR 'f%%d' rmdir $BASEDIR || true rm -f $MACHINEFILE diff --git a/lustre/tests/mdsrate-stat-small.sh b/lustre/tests/mdsrate-stat-small.sh index 062061e..a09367a 100644 --- a/lustre/tests/mdsrate-stat-small.sh +++ b/lustre/tests/mdsrate-stat-small.sh @@ -119,7 +119,7 @@ else fi fi -complete $SECONDS +complete_test $SECONDS mdsrate_cleanup $NUM_CLIENTS $MACHINEFILE $NUM_FILES $TESTDIR 'f%%d' rmdir $BASEDIR || true rm -f $MACHINEFILE diff --git a/lustre/tests/metadata-updates.sh b/lustre/tests/metadata-updates.sh index 86ae8db..ab92666 100755 --- a/lustre/tests/metadata-updates.sh +++ b/lustre/tests/metadata-updates.sh @@ -272,7 +272,7 @@ test_3() { } run_test 3 "write_disjoint test" -complete $SECONDS +complete_test $SECONDS rm -rf $TESTDIR check_and_cleanup_lustre exit_status diff --git a/lustre/tests/mmp.sh b/lustre/tests/mmp.sh index a4997ed..73fe4d6 100755 --- a/lustre/tests/mmp.sh +++ b/lustre/tests/mmp.sh @@ -670,7 +670,7 @@ run_test 10 "e2fsck with mounted filesystem" mmp_fini FAIL_ON_ERROR=$SAVED_FAIL_ON_ERROR -complete $SECONDS +complete_test $SECONDS $MMP_RESTORE_MOUNT && setupall check_and_cleanup_lustre exit_status diff --git a/lustre/tests/obdfilter-survey.sh b/lustre/tests/obdfilter-survey.sh index 890f0e4..af7b989 100644 --- a/lustre/tests/obdfilter-survey.sh +++ b/lustre/tests/obdfilter-survey.sh @@ -164,7 +164,7 @@ test_3a () { } run_test 3a "Network survey" -complete $SECONDS +complete_test $SECONDS cleanup_echo_devs check_and_cleanup_lustre exit_status diff --git a/lustre/tests/ost-pools.sh b/lustre/tests/ost-pools.sh index a2c9880..6982cc4 100755 --- a/lustre/tests/ost-pools.sh +++ b/lustre/tests/ost-pools.sh @@ -1826,7 +1826,7 @@ run_test 31 "OST pool spilling chained" cd $ORIG_PWD -complete $SECONDS +complete_test $SECONDS destroy_test_pools $FSNAME if ! combined_mgs_mds; then zconf_umount $mgs_HOST $MOUNT diff --git a/lustre/tests/parallel-scale-cifs.sh b/lustre/tests/parallel-scale-cifs.sh index cb1c40e..e95af6b 100644 --- a/lustre/tests/parallel-scale-cifs.sh +++ b/lustre/tests/parallel-scale-cifs.sh @@ -246,5 +246,5 @@ test_iozone() { } run_test iozone "iozone on cifs clients" -complete $SECONDS +complete_test $SECONDS exit_status diff --git a/lustre/tests/parallel-scale-nfs.sh b/lustre/tests/parallel-scale-nfs.sh index ab88f37..4e7e70c 100755 --- a/lustre/tests/parallel-scale-nfs.sh +++ b/lustre/tests/parallel-scale-nfs.sh @@ -137,5 +137,5 @@ test_racer_on_nfs() { } run_test racer_on_nfs "racer on NFS client" -complete $SECONDS +complete_test $SECONDS exit_status diff --git a/lustre/tests/parallel-scale.sh b/lustre/tests/parallel-scale.sh index c82a302..96232cc 100644 --- a/lustre/tests/parallel-scale.sh +++ b/lustre/tests/parallel-scale.sh @@ -183,6 +183,6 @@ run_test xdd "xdd" [ "$mds1_FSTYPE" = zfs -o "$ost1_FSTYPE" = zfs ] && SLOW=$ZFSSLOW -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/performance-sanity.sh b/lustre/tests/performance-sanity.sh index 27e9893..a9fe4bf 100644 --- a/lustre/tests/performance-sanity.sh +++ b/lustre/tests/performance-sanity.sh @@ -66,7 +66,7 @@ test_8() { } run_test 8 "getattr large files ======" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre [ -f "$LOG" ] && cat $LOG || true exit_status diff --git a/lustre/tests/pjdfstest.sh b/lustre/tests/pjdfstest.sh index 39b4c0f..b32550f 100644 --- a/lustre/tests/pjdfstest.sh +++ b/lustre/tests/pjdfstest.sh @@ -160,7 +160,7 @@ SUBTEST done cat << 'TAIL' -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status TAIL diff --git a/lustre/tests/posix.sh b/lustre/tests/posix.sh index 58ef6a3..04370f0 100755 --- a/lustre/tests/posix.sh +++ b/lustre/tests/posix.sh @@ -140,6 +140,6 @@ test_1() { } run_test 1 "install, build, run posix on $BASELINE_FS and lustre, then compare" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/racer.sh b/lustre/tests/racer.sh index 6abe219..699a0c3 100644 --- a/lustre/tests/racer.sh +++ b/lustre/tests/racer.sh @@ -182,6 +182,6 @@ test_1() { } run_test 1 "racer on clients: ${CLIENTS:-$(hostname)} DURATION=$DURATION" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/recovery-double-scale.sh b/lustre/tests/recovery-double-scale.sh index 57dc0b2..e168267 100644 --- a/lustre/tests/recovery-double-scale.sh +++ b/lustre/tests/recovery-double-scale.sh @@ -303,6 +303,6 @@ run_test pairwise_fail "pairwise combination of clients, MDS, and OST failures" zconf_mount $HOSTNAME $MOUNT || error "mount $MOUNT on $HOSTNAME failed" client_up || error "start client on $HOSTNAME failed" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/recovery-mds-scale.sh b/lustre/tests/recovery-mds-scale.sh index 6d47aeb..d5950db 100644 --- a/lustre/tests/recovery-mds-scale.sh +++ b/lustre/tests/recovery-mds-scale.sh @@ -242,6 +242,6 @@ run_test failover_ost "failover OST" zconf_mount $HOSTNAME $MOUNT || error "mount $MOUNT on $HOSTNAME failed" client_up || error "start client on $HOSTNAME failed" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/recovery-random-scale.sh b/lustre/tests/recovery-random-scale.sh index dc4c3ae..4a96b80 100644 --- a/lustre/tests/recovery-random-scale.sh +++ b/lustre/tests/recovery-random-scale.sh @@ -262,6 +262,6 @@ run_test fail_client_mds "fail client, then failover MDS" zconf_mount $HOSTNAME $MOUNT || error "mount $MOUNT on $HOSTNAME failed" client_up || error "start client on $HOSTNAME failed" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh index cb93113..58185ea 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -3320,6 +3320,6 @@ test_153() { } run_test 153 "evict vs reconnect race" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/replay-dual.sh b/lustre/tests/replay-dual.sh index 4637a0f..5845f6a 100755 --- a/lustre/tests/replay-dual.sh +++ b/lustre/tests/replay-dual.sh @@ -77,7 +77,7 @@ run_test 0a "expired recovery with lost client" if [ -f "$LU482_FAILED" ]; then log "Found check file $LU482_FAILED, aborting test script" rm -vf "$LU482_FAILED" - complete $SECONDS + complete_test $SECONDS do_nodes $CLIENTS umount -f $MOUNT2 || true do_nodes $CLIENTS umount -f $MOUNT || true # copied from stopall, but avoid the MDS recovery @@ -1263,7 +1263,7 @@ test_31() { } run_test 31 "deadlock on file_remove_privs and occupied mod rpc slots" -complete $SECONDS +complete_test $SECONDS SLEEP=$((SECONDS - $NOW)) [ $SLEEP -lt $TIMEOUT ] && sleep $SLEEP [ "$MOUNTED2" = yes ] && zconf_umount $HOSTNAME $MOUNT2 || true diff --git a/lustre/tests/replay-ost-single.sh b/lustre/tests/replay-ost-single.sh index b3b1735..1dd849c 100755 --- a/lustre/tests/replay-ost-single.sh +++ b/lustre/tests/replay-ost-single.sh @@ -500,6 +500,6 @@ test_12b() { } run_test 12b "write after OST failover to a missing object" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/replay-single-lmv.sh b/lustre/tests/replay-single-lmv.sh index 63ec67a..0cdae1e 100755 --- a/lustre/tests/replay-single-lmv.sh +++ b/lustre/tests/replay-single-lmv.sh @@ -106,6 +106,6 @@ test_3b() { } run_test 3b "mkdir cross-node dir (fail mds with inode)" -complete $SECONDS +complete_test $SECONDS $CLEANUP diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index cb96252..9556162 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -5038,6 +5038,6 @@ test_136() { } run_test 136 "MDS to disconnect all OSPs first, then cleanup ldlm" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/replay-vbr.sh b/lustre/tests/replay-vbr.sh index 81012fc..04065c3 100755 --- a/lustre/tests/replay-vbr.sh +++ b/lustre/tests/replay-vbr.sh @@ -1206,6 +1206,6 @@ rm -f $cos_param_file [ "$CLIENTS" ] && zconf_mount_clients $CLIENTS $DIR -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/runtests b/lustre/tests/runtests index 71d152b..6e03d59 100755 --- a/lustre/tests/runtests +++ b/lustre/tests/runtests @@ -135,6 +135,6 @@ test_1() { } run_test 1 "All Runtests" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-benchmark.sh b/lustre/tests/sanity-benchmark.sh index 35a58fc..9fade96 100644 --- a/lustre/tests/sanity-benchmark.sh +++ b/lustre/tests/sanity-benchmark.sh @@ -224,6 +224,6 @@ test_fsx_partial_punch() { } run_test fsx_partial_punch "Verify fsx with partial punch via fallocate" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-dom.sh b/lustre/tests/sanity-dom.sh index 4fb8fa4..8c1b9f1 100644 --- a/lustre/tests/sanity-dom.sh +++ b/lustre/tests/sanity-dom.sh @@ -211,6 +211,6 @@ test_sanityn() } run_test sanityn "Run sanityn with Data-on-MDT files" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status "${TMP}/sanity.log ${TMP}/sanityn.log" diff --git a/lustre/tests/sanity-flr.sh b/lustre/tests/sanity-flr.sh index e1944f4..61d647c 100644 --- a/lustre/tests/sanity-flr.sh +++ b/lustre/tests/sanity-flr.sh @@ -4254,6 +4254,6 @@ test_208b() { } run_test 208b "mirror selection to prefer non-rotational devices for writes" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-gss.sh b/lustre/tests/sanity-gss.sh index c91af2e..3b6fc56 100755 --- a/lustre/tests/sanity-gss.sh +++ b/lustre/tests/sanity-gss.sh @@ -596,6 +596,6 @@ fi restore_to_default_flavor -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-hsm.sh b/lustre/tests/sanity-hsm.sh index 4db2769..98dfcef 100755 --- a/lustre/tests/sanity-hsm.sh +++ b/lustre/tests/sanity-hsm.sh @@ -5747,6 +5747,6 @@ test_606() { } run_test 606 "llog_reader groks changelog fields" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-krb5.sh b/lustre/tests/sanity-krb5.sh index f7a1002..003931a 100755 --- a/lustre/tests/sanity-krb5.sh +++ b/lustre/tests/sanity-krb5.sh @@ -779,7 +779,7 @@ test_151() { } run_test 151 "secure mgs connection: server flavor control" -complete $SECONDS +complete_test $SECONDS set_flavor_all null cleanup_gss check_and_cleanup_lustre diff --git a/lustre/tests/sanity-laudit.sh b/lustre/tests/sanity-laudit.sh index 0dc8689..58bf8f8 100644 --- a/lustre/tests/sanity-laudit.sh +++ b/lustre/tests/sanity-laudit.sh @@ -189,6 +189,6 @@ test_2() { } run_test 2 "laudit daemon mode" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-lfsck.sh b/lustre/tests/sanity-lfsck.sh index c497d45..0cf3e99 100644 --- a/lustre/tests/sanity-lfsck.sh +++ b/lustre/tests/sanity-lfsck.sh @@ -6137,6 +6137,6 @@ OSTCOUNT=${SAVED_OSTCOUNT} # cleanup the system at last REFORMAT="yes" cleanup_and_setup_lustre -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-lipe-find3.sh b/lustre/tests/sanity-lipe-find3.sh index 44a9f2f..f918d63 100644 --- a/lustre/tests/sanity-lipe-find3.sh +++ b/lustre/tests/sanity-lipe-find3.sh @@ -1402,6 +1402,6 @@ test_401() { } run_test 401 "lipe_find3 parens and commas do the right thing" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-lipe-scan3.sh b/lustre/tests/sanity-lipe-scan3.sh index b88ec1d..ccdf620 100644 --- a/lustre/tests/sanity-lipe-scan3.sh +++ b/lustre/tests/sanity-lipe-scan3.sh @@ -1122,6 +1122,6 @@ run_test 401 "lipe_scan3 script exit statuses work" FAIL_ON_ERROR=$SAVED_FAIL_ON_ERROR -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-lipe.sh b/lustre/tests/sanity-lipe.sh index 3a3ec37..63d08ca 100644 --- a/lustre/tests/sanity-lipe.sh +++ b/lustre/tests/sanity-lipe.sh @@ -1584,6 +1584,6 @@ test_201() { } run_test 201 "lipe_scan2 paths support" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-lnet.sh b/lustre/tests/sanity-lnet.sh index 8abb3fe..e13ce1f 100755 --- a/lustre/tests/sanity-lnet.sh +++ b/lustre/tests/sanity-lnet.sh @@ -2196,7 +2196,6 @@ test_302() { } run_test 302 "Check that peer debug info can be dumped" -complete $SECONDS - +complete_test $SECONDS cleanup_testsuite exit_status diff --git a/lustre/tests/sanity-lsnapshot.sh b/lustre/tests/sanity-lsnapshot.sh index afa20ca..4f8f905 100755 --- a/lustre/tests/sanity-lsnapshot.sh +++ b/lustre/tests/sanity-lsnapshot.sh @@ -365,6 +365,6 @@ run_test 4 "create/delete snapshot after MGS remount" lss_cleanup do_facet mgs $LCTL set_param debug=-snapshot do_nodes $(comma_list $(mdts_nodes)) $LCTL set_param debug=-snapshot -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-pcc.sh b/lustre/tests/sanity-pcc.sh index e727758..205da28 100644 --- a/lustre/tests/sanity-pcc.sh +++ b/lustre/tests/sanity-pcc.sh @@ -5485,6 +5485,6 @@ test_210() { } run_test 210 "lpcc system service and command line tool test" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-pfl.sh b/lustre/tests/sanity-pfl.sh index 16aff0d..d8f9a00 100644 --- a/lustre/tests/sanity-pfl.sh +++ b/lustre/tests/sanity-pfl.sh @@ -2734,6 +2734,6 @@ test_100d() { } run_test 100d "lfs find compress component" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-pumount.sh b/lustre/tests/sanity-pumount.sh index e3680bc..e7ff55c 100755 --- a/lustre/tests/sanity-pumount.sh +++ b/lustre/tests/sanity-pumount.sh @@ -864,6 +864,6 @@ sanity_pumount_fini [ "$(mount | grep $MOUNT2)" ] && wait_update $HOSTNAME "fuser -m $MOUNT2" "" || true -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-quota.sh b/lustre/tests/sanity-quota.sh index 01b9d73..540fe4b 100755 --- a/lustre/tests/sanity-quota.sh +++ b/lustre/tests/sanity-quota.sh @@ -5642,7 +5642,7 @@ reset_quota_settings quota_fini cd $ORIG_PWD -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre export QUOTA_AUTO=$QUOTA_AUTO_OLD exit_status diff --git a/lustre/tests/sanity-scrub.sh b/lustre/tests/sanity-scrub.sh index 72ad44c..e61f592 100644 --- a/lustre/tests/sanity-scrub.sh +++ b/lustre/tests/sanity-scrub.sh @@ -1399,6 +1399,6 @@ OSTCOUNT=${SAVED_OSTCOUNT} # cleanup the system at last REFORMAT="yes" cleanup_and_setup_lustre -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-sec.sh b/lustre/tests/sanity-sec.sh index 2dee8c8..1e656ac 100755 --- a/lustre/tests/sanity-sec.sh +++ b/lustre/tests/sanity-sec.sh @@ -5831,6 +5831,6 @@ sec_unsetup() { } sec_unsetup -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity-selinux.sh b/lustre/tests/sanity-selinux.sh index 90b5b9c..5446caf 100755 --- a/lustre/tests/sanity-selinux.sh +++ b/lustre/tests/sanity-selinux.sh @@ -850,6 +850,6 @@ test_21b() { } run_test 21b "Send sepol for metadata ops" -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index ecd6af5..b0eb357 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -28900,8 +28900,7 @@ test_906() { } run_test 906 "Simple test for io_uring I/O engine via fio" - -complete $SECONDS +complete_test $SECONDS [ -f $EXT2_DEV ] && rm $EXT2_DEV || true check_and_cleanup_lustre if [ "$I_MOUNTED" != "yes" ]; then diff --git a/lustre/tests/sanityn.sh b/lustre/tests/sanityn.sh index fa348ac..72ed7e1 100755 --- a/lustre/tests/sanityn.sh +++ b/lustre/tests/sanityn.sh @@ -5935,7 +5935,7 @@ log "cleanup: ======================================================" [ "$(mount | grep $MOUNT2)" ] && wait_update $HOSTNAME "fuser -m $MOUNT2" "" || true -complete $SECONDS +complete_test $SECONDS rm -f $SAMPLE_FILE check_and_cleanup_lustre exit_status diff --git a/lustre/tests/scrub-performance.sh b/lustre/tests/scrub-performance.sh index aee5aa0..528b17a 100644 --- a/lustre/tests/scrub-performance.sh +++ b/lustre/tests/scrub-performance.sh @@ -184,6 +184,6 @@ run_test 0 "OI scrub performance test" # cleanup the system at last scrub_cleanup -complete $SECONDS +complete_test $SECONDS check_and_cleanup_lustre exit_status diff --git a/lustre/tests/sgpdd-survey.sh b/lustre/tests/sgpdd-survey.sh index b2c1e23..0b9a53c 100644 --- a/lustre/tests/sgpdd-survey.sh +++ b/lustre/tests/sgpdd-survey.sh @@ -76,5 +76,5 @@ test_2 () { } run_test 2 "sgpdd-survey, osts, scsidevs" -complete $SECONDS +complete_test $SECONDS exit_status diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 67dcfd2..b87eddc 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -6620,12 +6620,12 @@ trace() { return 1 } -complete () { - local duration=$1 +complete_test() { + local duration=$1 - banner test complete, duration $duration sec - [ -f "$TESTSUITELOG" ] && egrep .FAIL $TESTSUITELOG || true - echo duration $duration >>$TESTSUITELOG + banner "test complete, duration $duration sec" + [ -f "$TESTSUITELOG" ] && egrep .FAIL $TESTSUITELOG || true + echo "duration $duration" >>$TESTSUITELOG } pass() { -- 1.8.3.1