Whamcloud - gitweb
LU-13055 changelog: use default mask if server has no mask
[fs/lustre-release.git] / lustre / tests / sanity.sh
index 45b4494..57fc1f7 100755 (executable)
@@ -16352,7 +16352,7 @@ test_160o() {
 
        changelog_register --user test_160o -m unlnk+close+open ||
                error "changelog_register failed"
-       # drop server mask so it doesn't interfere
+
        do_facet $SINGLEMDS $LCTL --device $mdt \
                                changelog_register -u "Tt3_-#" &&
                error "bad symbols in name should fail"
@@ -16443,6 +16443,28 @@ test_160p() {
 }
 run_test 160p "Changelog orphan cleanup with no users"
 
+test_160q() {
+       local mdt="$(facet_svc $SINGLEMDS)"
+       local clu
+
+       [[ $PARALLEL != "yes" ]] || skip "skip parallel run"
+       remote_mds_nodsh && skip "remote MDS with nodsh"
+       [ $MDS1_VERSION -ge $(version_code 2.14.54) ] ||
+               skip "Need MDS version at least 2.14.54"
+
+       # set server mask to minimal value like server init does
+       changelog_chmask "MARK"
+       clu=$(do_facet $SINGLEMDS $LCTL --device $mdt changelog_register -n) ||
+               error "changelog_register failed"
+       # check effective mask again, should be treated as DEFMASK now
+       mask=$(do_facet $SINGLEMDS $LCTL get_param \
+                               mdd.$mdt.changelog_current_mask -n)
+       do_facet $SINGLEMDS $LCTL --device $mdt changelog_deregister $clu ||
+               error "changelog_deregister failed"
+       [[ $mask == *"HLINK"* ]] || error "mask is not DEFMASK as expected"
+}
+run_test 160q "changelog effective mask is DEFMASK if not set"
+
 test_161a() {
        [ $PARALLEL == "yes" ] && skip "skip parallel run"
 
@@ -25145,7 +25167,7 @@ check_lfs_df() {
        [ "$1" == "blocks" ] && inodes= || inodes="-i"
 
        for count in {1..100}; do
-               cancel_lru_locks
+               do_rpc_nodes "$CLIENTS" cancel_lru_locks
                sync; sleep 0.2
 
                # read the lines of interest
@@ -27238,6 +27260,21 @@ test_902() {
 }
 run_test 902 "test short write doesn't hang lustre"
 
+# LU-14711
+test_903() {
+       $LFS setstripe -i 0 -c 1 $DIR/$tfile $DIR/${tfile}-2
+       echo "blah" > $DIR/${tfile}-2
+       dd if=/dev/zero of=$DIR/$tfile bs=1M count=6 conv=fsync
+       #define OBD_FAIL_OSC_SLOW_PAGE_EVICT 0x417
+       $LCTL set_param fail_loc=0x417 fail_val=20
+
+       mv $DIR/${tfile}-2 $DIR/$tfile # Destroys the big object
+       sleep 1 # To start the destroy
+       wait_destroy_complete 150 || error "Destroy taking too long"
+       cat $DIR/$tfile > /dev/null || error "Evicted"
+}
+run_test 903 "Test long page discard does not cause evictions"
+
 complete $SECONDS
 [ -f $EXT2_DEV ] && rm $EXT2_DEV || true
 check_and_cleanup_lustre