From: Zhao Lei <[email protected]>

_is_block_dev() will show above warning when "$dev" is not exist.
It happened when user hadn't set $SCRATCH_DEV(optional) and check
$TEST_DEV.

Signed-off-by: Zhao Lei <[email protected]>
---
 common/rc | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/common/rc b/common/rc
index 5377ba0..d9815c7 100644
--- a/common/rc
+++ b/common/rc
@@ -1167,19 +1167,22 @@ _require_test()
                fi
                ;;
        *)
-                if [ -z "$TEST_DEV" -o "`_is_block_dev $TEST_DEV`" = "" ]
-                then
-                    _notrun "this test requires a valid \$TEST_DEV"
-                fi
-                if [ "`_is_block_dev $SCRATCH_DEV`" = "`_is_block_dev 
$TEST_DEV`" ]
-                then
-                    _notrun "this test requires a valid \$TEST_DEV"
-                fi
+               if [ -z "$TEST_DEV" -o "`_is_block_dev $TEST_DEV`" = "" ]
+               then
+                   _notrun "this test requires a valid \$TEST_DEV"
+               fi
+               if [ -n "$SCRATCH_DEV" ]
+               then
+                   if [ "`_is_block_dev $SCRATCH_DEV`" = "`_is_block_dev 
$TEST_DEV`" ]
+                   then
+                       _notrun "this test requires a valid \$TEST_DEV"
+                   fi
+               fi
                if [ ! -d "$TEST_DIR" ]
                then
-                    _notrun "this test requires a valid \$TEST_DIR"
+                   _notrun "this test requires a valid \$TEST_DIR"
                fi
-                ;;
+               ;;
     esac
 
     # mounted?
-- 
1.8.5.1

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to