X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Fsanity.sh;h=94dd3cdfc0bdd804c06dab7ed013f6002625f173;hp=84b18e0d1ea51889f51134711c9bb0214504de35;hb=79e65c81349f539aa2960a1889144ce71d91351e;hpb=e43581dcd18c76f391e8d5daa314d6c684c63b66 diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 84b18e0..94dd3cd 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -6549,6 +6549,25 @@ test_102n() { # LU-4101 mdt: protect internal xattrs } run_test 102n "silently ignore setxattr on internal trusted xattrs" +test_102p() { # LU-4703 setxattr did not check ownership + local testfile=$DIR/$tfile + + [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.5.56) ] && + skip "MDS needs to be at least 2.5.56" && return + + touch $testfile + + echo "setfacl as user..." + $RUNAS setfacl -m "u:$RUNAS_ID:rwx" $testfile + [ $? -ne 0 ] || error "setfacl by $RUNAS_ID was allowed on $testfile" + + echo "setfattr as user..." + setfacl -m "u:$RUNAS_ID:---" $testfile + $RUNAS setfattr -x system.posix_acl_access $testfile + [ $? -ne 0 ] || error "setfattr by $RUNAS_ID was allowed on $testfile" +} +run_test 102p "check setxattr(2) correctly fails without permission" + run_acl_subtest() { $LUSTRE/tests/acl/run $LUSTRE/tests/acl/$1.test @@ -6925,14 +6944,17 @@ test_116b() { # LU-2093 [ $PARALLEL == "yes" ] && skip "skip parallel run" && return #define OBD_FAIL_MDS_OSC_CREATE_FAIL 0x147 local old_rr - old_rr=$(do_facet $SINGLEMDS lctl get_param -n lov.*mdtlov*.qos_threshold_rr) - do_facet $SINGLEMDS lctl set_param lov.*mdtlov*.qos_threshold_rr 0 + old_rr=$(do_facet $SINGLEMDS lctl get_param -n \ + lo*.$FSNAME-MDT0000-mdtlov.qos_threshold_rr | head -1) + do_facet $SINGLEMDS lctl set_param \ + lo*.$FSNAME-MDT0000-mdtlov.qos_threshold_rr=0 mkdir -p $DIR/$tdir do_facet $SINGLEMDS lctl set_param fail_loc=0x147 createmany -o $DIR/$tdir/f- 20 || error "can't create" do_facet $SINGLEMDS lctl set_param fail_loc=0 rm -rf $DIR/$tdir - do_facet $SINGLEMDS lctl set_param lov.*mdtlov*.qos_threshold_rr $old_rr + do_facet $SINGLEMDS lctl set_param \ + lo*.$FSNAME-MDT0000-mdtlov.qos_threshold_rr=$old_rr } run_test 116b "QoS shouldn't LBUG if not enough OSTs found on the 2nd pass"