Whamcloud - gitweb
LU-8251 tests: Delete only test files for sanityn
[fs/lustre-release.git] / lustre / tests / sanityn.sh
index fc9a971..334168c 100755 (executable)
@@ -1391,10 +1391,10 @@ test_40a() {
        rmdir $DIR2/$tfile-3
        check_pdo_conflict $PID1 || error "unlink is blocked"
 
-       # all operations above shouldn't wait the first one
+       #  all operations above shouldn't wait the first one
        check_pdo_conflict $PID1 || error "parallel operation is blocked"
        wait $PID1
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 40a "pdirops: create vs others =============="
@@ -1424,7 +1424,7 @@ test_40b() {
 
         check_pdo_conflict $PID1 || error "parallel operation is blocked"
        wait $PID1
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 40b "pdirops: open|create and others =============="
@@ -1455,7 +1455,7 @@ test_40c() {
         # all operations above shouldn't wait the first one
        check_pdo_conflict $PID1 || error "parallel operation is blocked"
        wait $PID1
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 40c "pdirops: link and others =============="
@@ -1514,7 +1514,7 @@ test_40e() {
        # all operations above shouldn't wait the first one
        check_pdo_conflict $PID1 || error "parallel operation is blocked"
        wait $PID1
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 40e "pdirops: rename and others =============="
@@ -1528,7 +1528,7 @@ test_41a() {
        sleep 1
        mkdir $DIR2/$tfile && error "mkdir must fail"
        check_pdo_conflict $PID1 && { wait $PID1; echo "mkdir isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 41a "pdirops: create vs mkdir =============="
@@ -1541,7 +1541,7 @@ test_41b() {
        sleep 1
        $MULTIOP $DIR2/$tfile oO_CREAT:O_EXCL:c && error "create must fail"
        check_pdo_conflict $PID1 && { wait $PID1; error "create isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 41b "pdirops: create vs create =============="
@@ -1555,7 +1555,7 @@ test_41c() {
        sleep 1
        link $DIR2/$tfile-2 $DIR2/$tfile && error "link must fail"
        check_pdo_conflict $PID1 && { wait $PID1; error "link isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 41c "pdirops: create vs link =============="
@@ -1568,7 +1568,7 @@ test_41d() {
        sleep 1
        rm $DIR2/$tfile || error "unlink must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "unlink isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 41d "pdirops: create vs unlink =============="
@@ -1582,7 +1582,7 @@ test_41e() {
        sleep 1
        mv $DIR2/$tfile-2 $DIR2/$tfile || error "rename must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 41e "pdirops: create and rename (tgt) =============="
@@ -1595,7 +1595,7 @@ test_41f() {
        sleep 1
        mv $DIR2/$tfile $DIR2/$tfile-2 || error "rename must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 41f "pdirops: create and rename (src) =============="
@@ -1608,7 +1608,7 @@ test_41g() {
        sleep 1
        stat $DIR2/$tfile > /dev/null || error "stat must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "getattr isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 41g "pdirops: create vs getattr =============="
@@ -1621,7 +1621,7 @@ test_41h() {
        sleep 1
        ls -lia $DIR2/ > /dev/null
        check_pdo_conflict $PID1 && { wait $PID1; error "readdir isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 41h "pdirops: create vs readdir =============="
@@ -1635,7 +1635,7 @@ test_42a() {
        sleep 1
        mkdir $DIR2/$tfile && error "mkdir must fail"
        check_pdo_conflict $PID1 && { wait $PID1; error "mkdir isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 42a "pdirops: mkdir vs mkdir =============="
@@ -1648,7 +1648,7 @@ test_42b() {
        sleep 1
        $MULTIOP $DIR2/$tfile oO_CREAT:O_EXCL:c && error "create must fail"
        check_pdo_conflict $PID1 && { wait $PID1; error "create isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 42b "pdirops: mkdir vs create =============="
@@ -1662,7 +1662,7 @@ test_42c() {
        sleep 1
        link $DIR2/$tfile-2 $DIR2/$tfile && error "link must fail"
        check_pdo_conflict $PID1 && { wait $PID1; error "link isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 42c "pdirops: mkdir vs link =============="
@@ -1675,7 +1675,7 @@ test_42d() {
        sleep 1
        rmdir $DIR2/$tfile || error "unlink must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "unlink isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 42d "pdirops: mkdir vs unlink =============="
@@ -1689,7 +1689,7 @@ test_42e() {
        sleep 1
        mv -T $DIR2/$tfile-2 $DIR2/$tfile && error "rename must fail"
        check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 42e "pdirops: mkdir and rename (tgt) =============="
@@ -1702,7 +1702,7 @@ test_42f() {
        sleep 1
        mv $DIR2/$tfile $DIR2/$tfile-2 || error "rename must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 42f "pdirops: mkdir and rename (src) =============="
@@ -1715,7 +1715,7 @@ test_42g() {
        sleep 1
        stat $DIR2/$tfile > /dev/null || error "stat must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "getattr isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 42g "pdirops: mkdir vs getattr =============="
@@ -1728,7 +1728,7 @@ test_42h() {
        sleep 1
        ls -lia $DIR2/ > /dev/null
        check_pdo_conflict $PID1 && { wait $PID1; error "readdir isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 42h "pdirops: mkdir vs readdir =============="
@@ -1743,7 +1743,7 @@ test_43a() {
        sleep 1
        mkdir $DIR2/$tfile || error "mkdir must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "mkdir isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 43a "pdirops: unlink vs mkdir =============="
@@ -1757,7 +1757,7 @@ test_43b() {
        sleep 1
        $MULTIOP $DIR2/$tfile oO_CREAT:O_EXCL:c || error "create must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "create isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 43b "pdirops: unlink vs create =============="
@@ -1772,7 +1772,7 @@ test_43c() {
        sleep 1
        link $DIR2/$tfile-2 $DIR2/$tfile || error "link must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "link isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 43c "pdirops: unlink vs link =============="
@@ -1786,7 +1786,7 @@ test_43d() {
        sleep 1
        rm $DIR2/$tfile && error "unlink must fail"
        check_pdo_conflict $PID1 && { wait $PID1; error "unlink isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 43d "pdirops: unlink vs unlink =============="
@@ -1801,7 +1801,7 @@ test_43e() {
        sleep 1
        mv -u $DIR2/$tfile-2 $DIR2/$tfile || error "rename must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 43e "pdirops: unlink and rename (tgt) =============="
@@ -1815,7 +1815,7 @@ test_43f() {
        sleep 1
        mv $DIR2/$tfile $DIR2/$tfile-2 && error "rename must fail"
        check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 43f "pdirops: unlink and rename (src) =============="
@@ -1829,7 +1829,7 @@ test_43g() {
        sleep 1
        stat $DIR2/$tfile > /dev/null && error "stat must fail"
        check_pdo_conflict $PID1 && { wait $PID1; error "getattr isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 43g "pdirops: unlink vs getattr =============="
@@ -1843,7 +1843,7 @@ test_43h() {
        sleep 1
        ls -lia $DIR2/ > /dev/null
        check_pdo_conflict $PID1 && { wait $PID1; error "readdir isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 43h "pdirops: unlink vs readdir =============="
@@ -1859,7 +1859,7 @@ test_43i() {
        $LFS mkdir -i 1 $DIR2/$tfile || error "remote mkdir must succeed"
        check_pdo_conflict $PID1 &&
                { wait $PID1; error "remote mkdir isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 43i "pdirops: unlink vs remote mkdir"
@@ -1874,7 +1874,7 @@ test_44a() {
        sleep 1
        mkdir $DIR2/$tfile && error "mkdir must fail"
        check_pdo_conflict $PID1 && { wait $PID1; error "mkdir isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 44a "pdirops: rename tgt vs mkdir =============="
@@ -1888,7 +1888,7 @@ test_44b() {
        sleep 1
        $MULTIOP $DIR2/$tfile oO_CREAT:O_EXCL:c && error "create must fail"
        check_pdo_conflict $PID1 && { wait $PID1; error "create isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 44b "pdirops: rename tgt vs create =============="
@@ -1903,7 +1903,7 @@ test_44c() {
        sleep 1
        link $DIR2/$tfile-3 $DIR2/$tfile && error "link must fail"
        check_pdo_conflict $PID1 && { wait $PID1; error "link isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 44c "pdirops: rename tgt vs link =============="
@@ -1917,7 +1917,7 @@ test_44d() {
        sleep 1
        rm $DIR2/$tfile || error "unlink must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "unlink isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 44d "pdirops: rename tgt vs unlink =============="
@@ -1933,7 +1933,7 @@ test_44e() {
        sleep 1
        mv $DIR2/$tfile-3 $DIR2/$tfile || error "rename must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 44e "pdirops: rename tgt and rename (tgt) =============="
@@ -1948,7 +1948,7 @@ test_44f() {
        sleep 1
        mv $DIR2/$tfile $DIR2/$tfile-3 || error "rename must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 44f "pdirops: rename tgt and rename (src) =============="
@@ -1962,7 +1962,7 @@ test_44g() {
        sleep 1
        stat $DIR2/$tfile > /dev/null || error "stat must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "getattr isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 44g "pdirops: rename tgt vs getattr =============="
@@ -1976,7 +1976,7 @@ test_44h() {
        sleep 1
        ls -lia $DIR2/ > /dev/null
        check_pdo_conflict $PID1 && { wait $PID1; error "readdir isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 44h "pdirops: rename tgt vs readdir =============="
@@ -1993,7 +1993,7 @@ test_44i() {
        $LFS mkdir -i 1 $DIR2/$tfile && error "remote mkdir must fail"
        check_pdo_conflict $PID1 && { wait $PID1;
                                error "remote mkdir isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 44i "pdirops: rename tgt vs remote mkdir"
@@ -2008,7 +2008,7 @@ test_45a() {
        sleep 1
        mkdir $DIR2/$tfile || error "mkdir must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "mkdir isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 45a "pdirops: rename src vs mkdir =============="
@@ -2022,7 +2022,7 @@ test_45b() {
        sleep 1
        $MULTIOP $DIR2/$tfile oO_CREAT:O_EXCL:c || error "create must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "create isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 45b "pdirops: rename src vs create =============="
@@ -2037,7 +2037,7 @@ test_45c() {
        sleep 1
        link $DIR2/$tfile-3 $DIR2/$tfile || error "link must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "link isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 45c "pdirops: rename src vs link =============="
@@ -2051,7 +2051,7 @@ test_45d() {
        sleep 1
        rm $DIR2/$tfile && error "unlink must fail"
        check_pdo_conflict $PID1 && { wait $PID1; error "unlink isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 45d "pdirops: rename src vs unlink =============="
@@ -2066,7 +2066,7 @@ test_45e() {
        sleep 1
        mv $DIR2/$tfile-3 $DIR2/$tfile || error "rename must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 45e "pdirops: rename src and rename (tgt) =============="
@@ -2080,7 +2080,7 @@ test_45f() {
        sleep 1
        mv $DIR2/$tfile $DIR2/$tfile-3 && error "rename must fail"
        check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 45f "pdirops: rename src and rename (src) =============="
@@ -2094,7 +2094,7 @@ test_45g() {
        sleep 1
        stat $DIR2/$tfile > /dev/null && error "stat must fail"
        check_pdo_conflict $PID1 && { wait $PID1; error "getattr isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 45g "pdirops: rename src vs getattr =============="
@@ -2108,7 +2108,7 @@ test_45h() {
        sleep 1
        ls -lia $DIR2/ > /dev/null
        check_pdo_conflict $PID1 && { wait $PID1; error "readdir isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 45h "pdirops: unlink vs readdir =============="
@@ -2124,7 +2124,7 @@ test_45i() {
        $LFS mkdir -i 1 $DIR2/$tfile || error "create remote dir must succeed"
        check_pdo_conflict $PID1 && { wait $PID1;
                                error "create remote dir isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 45i "pdirops: rename src vs remote mkdir"
@@ -2139,7 +2139,7 @@ test_46a() {
        sleep 1
        mkdir $DIR2/$tfile && error "mkdir must fail"
        check_pdo_conflict $PID1 && { wait $PID1; error "mkdir isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 46a "pdirops: link vs mkdir =============="
@@ -2153,7 +2153,7 @@ test_46b() {
        sleep 1
        $MULTIOP $DIR2/$tfile oO_CREAT:O_EXCL:c && error "create must fail"
        check_pdo_conflict $PID1 && { wait $PID1; error "create isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 46b "pdirops: link vs create =============="
@@ -2167,7 +2167,7 @@ test_46c() {
        sleep 1
        link $DIR2/$tfile $DIR2/$tfile && error "link must fail"
        check_pdo_conflict $PID1 && { wait $PID1; error "link isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 46c "pdirops: link vs link =============="
@@ -2181,7 +2181,7 @@ test_46d() {
        sleep 1
        rm $DIR2/$tfile || error "unlink must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "unlink isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 46d "pdirops: link vs unlink =============="
@@ -2196,7 +2196,7 @@ test_46e() {
        sleep 1
        mv $DIR2/$tfile-3 $DIR2/$tfile || error "rename must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 46e "pdirops: link and rename (tgt) =============="
@@ -2211,7 +2211,7 @@ test_46f() {
        sleep 1
        mv $DIR2/$tfile $DIR2/$tfile-3 || error "rename must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "rename isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 46f "pdirops: link and rename (src) =============="
@@ -2225,7 +2225,7 @@ test_46g() {
        sleep 1
        stat $DIR2/$tfile > /dev/null || error "stat must succeed"
        check_pdo_conflict $PID1 && { wait $PID1; error "getattr isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 46g "pdirops: link vs getattr =============="
@@ -2240,7 +2240,7 @@ test_46h() {
        ls -lia $DIR2/ > /dev/null
        check_pdo_conflict $PID1 && { wait $PID1;
                        error "readdir isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 46h "pdirops: link vs readdir =============="
@@ -2256,7 +2256,7 @@ test_46i() {
        $LFS mkdir -i 1 $DIR2/$tfile && error "remote mkdir must fail"
        check_pdo_conflict $PID1 && { wait $PID1;
                                error "remote mkdir isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 46i "pdirops: link vs remote mkdir"
@@ -2271,7 +2271,7 @@ test_47a() {
        sleep 1
        mkdir $DIR2/$tfile && error "mkdir must fail"
        check_pdo_conflict $PID1 && { wait $PID1; error "mkdir isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 47a "pdirops: remote mkdir vs mkdir"
@@ -2286,7 +2286,7 @@ test_47b() {
        multiop $DIR2/$tfile oO_CREAT:O_EXCL:c && error "create must fail"
        check_pdo_conflict $PID1 && { wait $PID1;
                                        error "create isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 47b "pdirops: remote mkdir vs create"
@@ -2301,7 +2301,7 @@ test_47c() {
        sleep 1
        link $DIR2/$tfile-2 $DIR2/$tfile && error "link must fail"
        check_pdo_conflict $PID1 && { wait $PID1; error "link isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 47c "pdirops: remote mkdir vs link"
@@ -2316,7 +2316,7 @@ test_47d() {
        rmdir $DIR2/$tfile || error "unlink must succeed"
        check_pdo_conflict $PID1 && { wait $PID1;
                                        error "unlink isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 47d "pdirops: remote mkdir vs unlink"
@@ -2332,7 +2332,7 @@ test_47e() {
        mv -T $DIR2/$tfile-2 $DIR2/$tfile && error "rename must fail"
        check_pdo_conflict $PID1 && { wait $PID1;
                                        error "rename isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 47e "pdirops: remote mkdir and rename (tgt)"
@@ -2347,7 +2347,7 @@ test_47f() {
        mv $DIR2/$tfile $DIR2/$tfile-2 || error "rename must succeed"
        check_pdo_conflict $PID1 && { wait $PID1;
                                        error "rename isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 47f "pdirops: remote mkdir and rename (src)"
@@ -2362,7 +2362,7 @@ test_47g() {
        stat $DIR2/$tfile > /dev/null || error "stat must succeed"
        check_pdo_conflict $PID1 && { wait $PID1;
                                        error "getattr isn't blocked"; }
-       rm -r $DIR1/*
+       rm -rf $DIR/$tfile*
        return 0
 }
 run_test 47g "pdirops: remote mkdir vs getattr"
@@ -3211,6 +3211,43 @@ test_77g() {
 }
 run_test 77g "Change TBF type directly"
 
+test_77h() {
+       [ $(lustre_version_code ost1) -ge $(version_code 2.8.55) ] ||
+               { skip "Need OST version at least 2.8.55"; return 0; }
+
+       local old_policy=$(do_facet ost1 \
+               lctl get_param ost.OSS.ost_io.nrs_policies)
+       local new_policy
+
+       do_facet ost1 lctl set_param \
+               ost.OSS.ost_io.nrs_policies="abc"
+       [ $? -eq 0 ] && error "should return error"
+
+       do_facet ost1 lctl set_param \
+               ost.OSS.ost_io.nrs_policies="tbf\ abc"
+       [ $? -eq 0 ] && error "should return error"
+
+       do_facet ost1 lctl set_param \
+               ost.OSS.ost_io.nrs_policies="tbf\ reg"
+       [ $? -eq 0 ] && error "should return error"
+
+       do_facet ost1 lctl set_param \
+               ost.OSS.ost_io.nrs_policies="tbf\ reg\ abc"
+       [ $? -eq 0 ] && error "should return error"
+
+       do_facet ost1 lctl set_param \
+               ost.OSS.ost_io.nrs_policies="tbf\ abc\ efg"
+       [ $? -eq 0 ] && error "should return error"
+
+       new_policy=$(do_facet ost1 lctl get_param ost.OSS.ost_io.nrs_policies)
+       [ $? -eq 0 ] || error "shouldn't LBUG"
+
+       [ "$old_policy" = "$new_policy" ] || error "NRS policy should be same"
+
+       return 0
+}
+run_test 77h "Wrong policy name should report error, not LBUG"
+
 test_78() { #LU-6673
        local rc
 
@@ -3420,7 +3457,7 @@ test_81() {
        touch d0/0      || error "create 0 failed"
        mv d0/0 d1/0    || error "rename d0/0 d1/0 failed"
        stat d0/0       && error "stat mv filed succeed"
-       mv $DIR2/$tdir/d1/0 $DIR2/$tdir/d0/0 || "rename d1/0 d0/0 failed"
+       mv $DIR2/$tdir/d1/0 $DIR2/$tdir/d0/0 || error "rename d1/0 d0/0 failed"
        stat d0/0       || error "stat failed"
 
        local t=$(ls -ai $DIR1/$tdir/d0 | sort -u | wc -l)