From: Alex Zhuravlev Date: Fri, 29 May 2020 09:38:43 +0000 (+0300) Subject: LU-12905 tests: wrappers for createmany and unlinkmany X-Git-Tag: 2.13.55~94 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F85%2F36585%2F15;p=fs%2Flustre-release.git LU-12905 tests: wrappers for createmany and unlinkmany which set debug=0 if number of operations is high enough. this is to speedup testing. according to Maloo sanity in review-ldiskfs takes ~9min less. Signed-off-by: Alex Zhuravlev Change-Id: I0e0a0ef6cf217ecddd1b780103d01e2109fc33d9 Reviewed-on: https://review.whamcloud.com/36585 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Olaf Faaland-LLNL Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index bec90b5..fcbd4d1 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -10436,3 +10436,40 @@ statx_supported() { $STATX --quiet --version return $? } + +# +# wrappers for createmany and unlinkmany +# to set debug=0 if number of creates is high enough +# this is to speedup testing +# +function createmany() { + local count=${!#} + + (( count > 100 )) && { + local saved_debug=$($LCTL get_param -n debug) + local list=$(comma_list $(all_nodes)) + + do_nodes $list $LCTL set_param debug=0 + } + $LUSTRE/tests/createmany $* + local rc=$? + (( count > 100 )) && + do_nodes $list "$LCTL set_param debug=\\\"$saved_debug\\\"" + return $rc +} + +function unlinkmany() { + local count=${!#} + + (( count > 100 )) && { + local saved_debug=$($LCTL get_param -n debug) + local list=$(comma_list $(all_nodes)) + + do_nodes $list $LCTL set_param debug=0 + } + $LUSTRE/tests/unlinkmany $* + local rc=$? + (( count > 100 )) && + do_nodes $list "$LCTL set_param debug=\\\"$saved_debug\\\"" + return $rc +}