[Top] [All Lists]

[PATCH 3/3] xfstests: Do not fail on empty exclude groups

To: xfs@xxxxxxxxxxx
Subject: [PATCH 3/3] xfstests: Do not fail on empty exclude groups
From: ranto.boris@xxxxxxxxx
Date: Thu, 2 May 2013 16:03:59 +0200
Cc: Boris Ranto <ranto.boris@xxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=pwzxWhU369OsOo/pkya3nxd4GJYP29vS4ETSfG8NIDk=; b=0DMuuM85aMbObKfPYd3lE5+QtdX/BV/LyFhS7o7zFFGnLuk7WMmFLf3qYSko8o4t68 WUXG+CHviJvhPr71X328W8UwwH47v2D0IyE9+CM/yHVnX+IKGIQTl8l8E3Y2vlfwuEP1 JcxOfvJ6rYShQImvOIZbW18iyU2e4PDNSlVhI2jr8jnvZp7Gcc83vPO1q3LLft0Ea3ME kMYeUwD5peO0kUKqGa6zBC0VWs3PraWV48601pKI7fVqlx/hJca4YB4uGwnupgjRZTyV LYTNuKA4HFsfLt/EWsKlxxuGdMC1LqD+615nVEgFVQRbfHuFCkQufpLbBqzzhr/dC1No CDSQ==
In-reply-to: <1367503439-12827-1-git-send-email-ranto.boris@xxxxxxxxx>
References: <1367503439-12827-1-git-send-email-ranto.boris@xxxxxxxxx>
From: Boris Ranto <ranto.boris@xxxxxxxxx>

Currently, xfstests will fail as soon as it detects an empty exclude
group. However, this may cause problems in automated testing. For
example, if one wishes to exclude otherwise valid group dmapi for file
system like tmpfs or nfs, the ./check script will hit the error about
empty group and fail. This simple patch changes the error to warning,
prints the warning to stderr and simply continue without excluding
anything as there are no tests to be excluded.

Signed-off-by: Boris Ranto <ranto.boris@xxxxxxxxx>
 check |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/check b/check
index 4af2dbd..b888030 100755
--- a/check
+++ b/check
@@ -194,12 +194,13 @@ while [ $# -gt 0 ]; do
                [ ! -s $tmp.list ] && get_all_tests
                group_list=$(get_group_list $xgroup)
+               # Trim the test list only if there is something to trim it with
                if [ -z "$group_list" ]; then
-                   echo "Group \"$xgroup\" is empty or not defined?"
-                   exit 1
+                   echo "Warning: Group \"$xgroup\" seems empty." 1>&2
+               else
+                   trim_test_list $group_list
-               trim_test_list $group_list
        -X)     xfile=$2; shift ;

<Prev in Thread] Current Thread [Next in Thread>