From: Lai Siyao Date: Fri, 8 Nov 2024 19:14:26 +0000 (-0800) Subject: LU-7665 test: improve sanity 300p X-Git-Tag: 2.15.6-RC1~10 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F41%2F56941%2F3;p=fs%2Flustre-release.git LU-7665 test: improve sanity 300p 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. Lustre-change: https://review.whamcloud.com/54625 Lustre-commit: ac04484c1beec9f46d1256e8ea236f24073344af 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 Change-Id: I128ce39aaf97e1785a8c135a696d0b404b48a2a8 Reviewed-by: Jian Yu Reviewed-by: Yang Sheng Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56941 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 9ce093a..8db128e 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -23947,14 +23947,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"