Whamcloud - gitweb
LU-7665 test: improve sanity 300p 25/54625/2
authorLai Siyao <lai.siyao@whamcloud.com>
Mon, 18 Mar 2024 05:13:14 +0000 (01:13 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 5 Jun 2024 04:50:43 +0000 (04:50 +0000)
Sanity test 300p set OBD_FAIL_OUT_ENOSPC once, but it may fail llog
operation (not critical), therefore subsequent mkdir succeeds. Change
the fail_loc to always fail so the test can be more robust.

Test-Parameters: trivial
Test-Parameters: mdscount=2 mdtcount=4 testlist=sanity
Test-Parameters: mdscount=2 mdtcount=4 testlist=sanity
Test-Parameters: mdscount=2 mdtcount=4 testlist=sanity
Test-Parameters: mdscount=2 mdtcount=4 testlist=sanity
Test-Parameters: mdscount=2 mdtcount=4 testlist=sanity
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I128ce39aaf97e1785a8c135a696d0b404b48a2a8
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54625
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh

index b330197..77d5ae0 100755 (executable)
@@ -26787,14 +26787,11 @@ test_300p() {
        mkdir_on_mdt0 $DIR/$tdir
 
        #define OBD_FAIL_OUT_ENOSPC     0x1704
-       do_facet mds2 lctl set_param fail_loc=0x80001704
-       $LFS setdirstripe -i 0 -c2 $DIR/$tdir/bad_striped_dir > /dev/null 2>&1 \
-                && error "create striped directory should fail"
+       do_facet mds2 lctl set_param fail_loc=0x1704
+       $LFS setdirstripe -i 0,1 $DIR/$tdir/bad_striped_dir &&
+               error "create striped directory should fail"
 
-       [ -e $DIR/$tdir/bad_striped_dir ] && error "striped dir exists"
-
-       $LFS setdirstripe -c2 $DIR/$tdir/bad_striped_dir
-       true
+       ! [ -e $DIR/$tdir/bad_striped_dir ] || error "striped dir exists"
 }
 run_test 300p "create striped directory without space"