_require_prjquota: Disable tests only when using realtime fs
authorChandan Rajendra <chandan@linux.ibm.com>
Wed, 20 Mar 2019 14:21:12 +0000 (19:51 +0530)
committerEryu Guan <guaneryu@gmail.com>
Sun, 24 Mar 2019 02:37:43 +0000 (10:37 +0800)
$USE_EXTERNAL needs to be set when using external log devices. In such a
setup, tests which have "_require_prjquota
$SCRATCH_DEV" (e.g. generic/383)  incorrectly end up being marked as
"not run" since the test "[ "$USE_EXTERNAL" = yes -a ! -z "$_dev" ]"
evaluates to true.

This commit fixes the bug by marking the test as "not run" only when
$USE_EXTERNAL is set and one of $TEST_RTDEV or $SCRATCH_RTDEV is set.

Signed-off-by: Chandan Rajendra <chandan@linux.ibm.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/quota

index 9309e786bca4432637cb030dd73e46cd5154933e..f19f81a1d9132d0f904070f6298de2e197792220 100644 (file)
@@ -86,8 +86,10 @@ _require_prjquota()
     fi
     src/feature -P $_dev
     [ $? -ne 0 ] && _notrun "Installed kernel does not support project quotas"
-    if [ "$USE_EXTERNAL" = yes -a ! -z "$_dev" ]; then
-       _notrun "Project quotas not supported on realtime filesystem"
+    if [ "$USE_EXTERNAL" = yes ]; then
+       if [ -n "$TEST_RTDEV" -o -n "$SCRATCH_RTDEV" ]; then
+           _notrun "Project quotas not supported on realtime filesystem"
+       fi
     fi
 }