From 72675eb8ab54be272b37e9526a4eac949ffbc6d4 Mon Sep 17 00:00:00 2001 From: Sebastien Buisson Date: Tue, 3 Dec 2019 11:06:48 +0900 Subject: [PATCH] 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 --- lustre/tests/sanity-selinux.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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)" -- 1.8.3.1