Thread (20 messages) 20 messages, 4 authors, 2021-06-07
STALE1863d

[PATCH 01/10] fstests: fix group check in new script

From: "Darrick J. Wong" <djwong@kernel.org>
Date: 2021-05-26 01:46:51
Also in: fstests
Subsystem: the rest · Maintainer: Linus Torvalds

From: Darrick J. Wong <djwong@kernel.org>

In the tests/*/group files, group names are found in the Nth columns of
the file, where N > 1.  The grep expression to warn about unknown groups
is not correct (since it currently checks column 1), so fix this.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 new |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/new b/new
index bb427f0d..357983d9 100755
--- a/new
+++ b/new
@@ -243,10 +243,7 @@ else
     #
     for g in $*
     do
-	if grep "^$g[ 	]" $tdir/group >/dev/null
-	then
-	    :
-	else
+	if ! grep -q "[[:space:]]$g" "$tdir/group"; then
 	    echo "Warning: group \"$g\" not defined in $tdir/group"
 	fi
     done
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help