Whamcloud - gitweb
LU-12905 tests: wrappers for createmany and unlinkmany 85/36585/15
authorAlex Zhuravlev <bzzz@whamcloud.com>
Fri, 29 May 2020 09:38:43 +0000 (12:38 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 23 Jun 2020 08:12:36 +0000 (08:12 +0000)
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 <bzzz@whamcloud.com>
Change-Id: I0e0a0ef6cf217ecddd1b780103d01e2109fc33d9
Reviewed-on: https://review.whamcloud.com/36585
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/test-framework.sh

index bec90b5..fcbd4d1 100755 (executable)
@@ -10436,3 +10436,40 @@ statx_supported() {
        $STATX --quiet --version
        return $?
 }
        $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
+}