local MDTIDX=1
local remote_dir=remote_dir
+ [ $MDSCOUNT -ge 2 ] && skip "skip now for LU-4690" && return #LU-4690
test_mkdir $DIR/$remote_dir ||
error "Create remote directory failed"
}
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
[ $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"
}
run_test 237 "Verify name_to_handle_at/open_by_handle_at syscalls"
-# LU-4659 linkea consistency
-test_238() {
- touch $DIR/$tfile
- ln $DIR/$tfile $DIR/$tfile.lnk
- touch $DIR/$tfile.new
- mv $DIR/$tfile.new $DIR/$tfile
- local fid1=$(lfs path2fid $DIR/$tfile)
- local fid2=$(lfs path2fid $DIR/$tfile.lnk)
- local path1=$(lfs fid2path $FSNAME $fid1)
- [ $tfile == $path1 ] || error "linkea inconsistent: $tfile $fid1 $path1"
- local path2=$(lfs fid2path $FSNAME $fid2)
- [ $tfile.lnk == $path2 ] ||
- error "linkea inconsistent: $tfile.lnk $fid2 $path2!"
- rm -f $DIR/$tfile*
-}
-run_test 238 "Verify linkea consistency"
-
test_striped_dir() {
local mdt_index=$1
local stripe_count