+ dot_lustre_fid_permission_check "$fid" $DIR ||
+ error "dot lustre permission check $fid failed"
+
+ rm -rf $MOUNT/.lustre && error ".lustre is not allowed to be unlinked"
+ chmod 777 $MOUNT/.lustre && error ".lustre is not allowed to be chmod"
+
+ touch $MOUNT/.lustre/file &&
+ error "creation is not allowed under .lustre"
+
+ mkdir $MOUNT/.lustre/dir &&
+ error "mkdir is not allowed under .lustre"
+
+ rm -rf $DIR/$tfile
+}
+run_test 154a "Open-by-FID"
+
+test_154b() {
+ [ $PARALLEL == "yes" ] && skip "skip parallel run" && return
+ [[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.2.51) ]] ||
+ { skip "Need MDS version at least 2.2.51"; return 0; }
+
+ [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
+
+ local remote_dir=$DIR/$tdir/remote_dir
+ local MDTIDX=1
+ local rc=0
+
+ mkdir -p $DIR/$tdir
+ $LFS mkdir -i $MDTIDX $remote_dir ||
+ error "create remote directory failed"
+
+ cp /etc/hosts $remote_dir/$tfile
+
+ fid=$($LFS path2fid $remote_dir/$tfile)
+ rc=$?
+ [ $rc -ne 0 ] && error "error: could not get fid for $remote_dir/$tfile"
+
+ dot_lustre_fid_permission_check "$fid" $remote_dir ||
+ error "dot lustre permission check $fid failed"
+ rm -rf $DIR/$tdir