Whamcloud - gitweb
LU-14838 tests: skip sanityn/32a if no truncate_lock
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 7 Jun 2022 20:52:52 +0000 (14:52 -0600)
committerOleg Drokin <green@linuxhacker.ru>
Wed, 14 Sep 2022 02:53:21 +0000 (22:53 -0400)
Newer servers do not support truncate_lock since 2.14.53.
Skip sanityn.sh test_32a if this feature is not available.

Test-Parameters: trivial testlist=sanityn env=ONLY=32a
Test-Parameters: clientversion=2.14 testlist=sanityn env=ONLY=32a
Fixes: 6335dba839 ("LU-14838 osc: Remove lockless truncate")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ibe37b59eff2b11a1b5e6ddd7a5c0ba6dae9993f5

lustre/tests/sanityn.sh

index b67b5da..df5ecdc 100755 (executable)
@@ -808,6 +808,9 @@ enable_lockless_truncate() {
 }
 
 test_32a() { # bug 11270
+       $LCTL get_param osc.*.import | grep -q "connect_flags.*truncate_lock" ||
+               skip "missing truncate_lock support"
+
        local p="$TMP/$TESTSUITE-$TESTNAME.parameters"
        local stripe_size=$(do_facet $SINGLEMDS \
                "$LCTL get_param -n lod.$(facet_svc $SINGLEMDS)*.stripesize")