From: Sebastien Buisson Date: Tue, 3 Dec 2019 02:06:48 +0000 (+0900) Subject: LU-13042 tests: give more time in sanity-selinux test_21b X-Git-Tag: 2.13.51~42 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=72675eb8ab54be272b37e9526a4eac949ffbc6d4 LU-13042 tests: give more time in sanity-selinux test_21b In sanity-selinux test_21b, set sepol refresh time to 1000 seconds instead of 10. This gives plenty of time for file/dir access tests, and also cache drop, to complete. Then reset send_sepol to a smaller, already expired value, to force sepol refresh. Test-Parameters: trivial Test-Parameters: clientselinux mdtcount=4 testlist=sanity-selinux envdefinitions=ONLY="21b" Signed-off-by: Sebastien Buisson Change-Id: I57f72faad4bd55736a3240cdefdac2e5814eba79 Reviewed-on: https://review.whamcloud.com/36905 Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Nunez Reviewed-by: Alexey Lyashkov Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity-selinux.sh b/lustre/tests/sanity-selinux.sh index c3990be..6972f46 100755 --- a/lustre/tests/sanity-selinux.sh +++ b/lustre/tests/sanity-selinux.sh @@ -712,8 +712,9 @@ test_21b() { do_facet mgs $LCTL set_param -P nodemap.c0.sepol="$sepol" check_nodemap c0 sepol $sepol - # metadata ops with sepol every 10 seconds only - echo 10 > /sys/module/ptlrpc/parameters/send_sepol + # metadata ops with sepol every 1000 seconds only + echo 1000 > /sys/module/ptlrpc/parameters/send_sepol + local before=$(date +%s) touch $DIR/$tdir/f6 || error "touch (4)" lfs setstripe -c1 $DIR/$tdir/f7 || error "lfs setstripe (4)" mkdir $DIR/$tdir/d6 || error "mkdir (4)" @@ -762,7 +763,9 @@ test_21b() { ln $DIR/$tdir/toopen $DIR/$tdir/toopen_hl5 || error "hardlink (5)" echo 3 > /proc/sys/vm/drop_caches - sleep 10 + local after=$(date +%s) + # change send_sepol to a smaller, already expired, value + echo $((after-before-1)) > /sys/module/ptlrpc/parameters/send_sepol # metadata ops without matching sepol: should fail now touch $DIR/$tdir/f10 && error "touch (6)" lfs setstripe -c1 $DIR/$tdir/f11 && error "lfs setstripe (6)"