Whamcloud - gitweb
LU-12039 tests: fix 'lfs mkdir' in sanity-selinux 68/34368/2
authorSebastien Buisson <sbuisson@ddn.com>
Mon, 4 Mar 2019 07:43:42 +0000 (08:43 +0100)
committerOleg Drokin <green@whamcloud.com>
Fri, 15 Mar 2019 23:46:10 +0000 (23:46 +0000)
sanity-selinux test_2b and test_20c assume that directory created
with 'lfs mkdir' will be on MDT0, but they have to use the '-i 0'
flag to make sure.

Test-Parameters: trivial testlist=sanity-selinux clientselinux
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I57df7aed18673b9f7f1301b45e621bb76ebb9845
Reviewed-on: https://review.whamcloud.com/34368
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
lustre/tests/sanity-selinux.sh

index 66288ab..df3d512 100755 (executable)
@@ -137,7 +137,7 @@ test_2b() {
        mds_path=${mds_path#/}
 
        $LFS setdirstripe -i0 -c1 ${DIR}/$tdir || error "create dir failed"
-       $LFS mkdir -c0 $dirname1 || error "cannot 'lfs mkdir' $dirname1"
+       $LFS mkdir -c0 -i0 $dirname1 || error "cannot 'lfs mkdir' $dirname1"
 
        local xattrval=$(check_selinux_xattr "mds1" $mds_path)
 
@@ -354,7 +354,7 @@ test_20c() {
        do_facet client "$LCTL set_param fail_val=$req_delay fail_loc=0x140b"
 
        # create file on first mount point
-       lfs mkdir -c0 $dirname1 &
+       $LFS mkdir -c0 -i0 $dirname1 &
        local mkdirpid=$!
        sleep 5