[PATCH 1/4] fstests: fix group list generation for whacky test names

Dave Chinner
2022-05-16T08:59:35Z

From: Dave Chinner <dchinner@redhat.com>

Darrick noticed that tests/xfs/191-input-validation didn't get
generated properly. Fix the regex to handle this.

$ grep -I -R "^_begin_fstest" tests/xfs | \
sed -e 's/^.*\/\([0-9]*\):_begin_fstest/\1/' |grep 191
tests/xfs/191-input-validation:_begin_fstest auto quick mkfs realtime
$
$ grep -I -R "^_begin_fstest" tests/xfs | \
sed -e 's/^.*\/\([0-9]*\).*:_begin_fstest/\1/ ' |grep 191
191 auto quick mkfs realtime
$

Long term, we should rename that test to '191' and rip out all that
unused and unnecessary complexity for matching ascii test names
because we just don't use it. Numbers for tests are still working
just fine.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
tools/mkgroupfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/mkgroupfile b/tools/mkgroupfile
index 24435898..958d4e2f 100755
--- a/tools/mkgroupfile
+++ b/tools/mkgroupfile
@@ -60,7 +60,7 @@ ENDL

# Aggregate the groups each test belongs to for the group file
grep -I -R "^_begin_fstest" $test_dir/ | \
- sed -e 's/^.*\/\([0-9]*\):_begin_fstest/\1/' >> $new_groups
+ sed -e 's/^.*\/\([0-9]*\).*:_begin_fstest/\1/' >> $new_groups

# Create the list of unique groups for existence checking
grep -I -R "^_begin_fstest" $test_dir/ | \
--
2.35.1