Whamcloud - gitweb
LU-14826 mdt: getattr_name("..") under striped directory
[fs/lustre-release.git] / lustre / tests / sanityn.sh
index 6e37031..0ab469b 100755 (executable)
@@ -3198,6 +3198,9 @@ test_51d() {
 run_test 51d "layout lock: losing layout lock should clean up memory map region"
 
 test_51e() {
+       (( $MDS1_VERSION >= $(version_code 2.13.54.148) )) ||
+               skip "MDS version must be at least 2.13.54.148"
+
        local pid
 
        $MULTIOP $DIR/$tfile oO_CREAT:O_RDWR:eW_E+eUc &
@@ -5214,8 +5217,28 @@ test_102() {
        echo "Test file_handle syscalls" > $DIR/$tfile ||
                error "write failed"
        check_fhandle_syscalls $DIR/$tfile $DIR2 ||
-               error "check_fhandle_syscalls failed"
-       rm -f $DIR2/$tfile
+               error "check_fhandle_syscalls $tfile failed"
+
+       # test this is working on DNE directories also
+       if (( MDSCOUNT > 1  MDS1_VERSION >= $(version_code 2.14.52) )); then
+               $LFS mkdir -i 1 $DIR/$tdir.remote
+               cancel_lru_locks mdc
+               check_fhandle_syscalls $DIR/$tdir.remote $DIR2 ||
+                       error "check_fhandle_syscalls $tdir.remote failed"
+               $LFS mkdir -c -1 $DIR/$tdir.remote/subdir
+               cancel_lru_locks mdc
+               check_fhandle_syscalls $DIR/$tdir.remote/subdir $DIR2 ||
+                       error "check_fhandle_syscalls $tdir.remote/subdir fail"
+
+               $LFS mkdir -c -1 $DIR/$tdir.stripe
+               cancel_lru_locks mdc
+               check_fhandle_syscalls $DIR/$tdir.stripe $DIR2 ||
+                       error "check_fhandle_syscalls $tdir.stripe failed"
+               $LFS mkdir -c -1 $DIR/$tdir.stripe/subdir
+               cancel_lru_locks mdc
+               check_fhandle_syscalls $DIR/$tdir.stripe/subdir $DIR2 ||
+                       error "check_fhandle_syscalls $tdir.stripe/subdir fail"
+       fi
 }
 run_test 102 "Test open by handle of unlinked file"