diff mbox series

[01/28] fstests: remove support for non-numeric test names

Message ID 20250417031208.1852171-2-david@fromorbit.com (mailing list archive)
State New
Headers show
Series check-parallel: Running tests without check | expand

Commit Message

Dave Chinner April 17, 2025, 3 a.m. UTC
From: Dave Chinner <dchinner@redhat.com>

We haven't had any tests using the "999-the-mark-of-fstests" name
format for a long time. Th eonly test that used this format was
xfs/191-input-validation, and that got removed in 2022 by commit
c1941d6f5 ("xfs/191: remove broken test").

However, the infrastructure for this naming convention still exists,
so lets get rid of that dead code so we don't have to carry it
anymore.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
 check             | 15 ---------------
 common/test_names |  8 +-------
 new               | 24 ------------------------
 3 files changed, 1 insertion(+), 46 deletions(-)
diff mbox series

Patch

diff --git a/check b/check
index 9451c350b..d6bab8b5f 100755
--- a/check
+++ b/check
@@ -856,21 +856,6 @@  function run_section()
 	for ((ix = 0; ix < ${#_list[*]}; !${#loop_status[*]} && ix++)); do
 		seq="${_list[$ix]}"
 
-		if [ ! -f $seq ]; then
-			# Try to get full name in case the user supplied only
-			# seq id and the test has a name. A bit of hassle to
-			# find really the test and not its sample output or
-			# helping files.
-			bname=$(basename $seq)
-			full_seq=$(find $(dirname $seq) -name $bname* -executable |
-				awk '(NR == 1 || length < length(shortest)) { shortest = $0 }\
-				     END { print shortest }')
-			if [ -f $full_seq ] && \
-			   [ x$(echo $bname | grep -o "^$VALID_TEST_ID") != x ]; then
-				seq=$full_seq
-			fi
-		fi
-
 		# the filename for the test and the name output are different.
 		# we don't include the tests/ directory in the name output.
 		export seqnum=${seq#$SRC_DIR/}
diff --git a/common/test_names b/common/test_names
index 98af40cdb..b18fc9e36 100644
--- a/common/test_names
+++ b/common/test_names
@@ -2,11 +2,5 @@ 
 
 # Valid test names start with 3 digits "NNN":
 #  "[0-9]\{3\}"
-# followed by an optional "-":
-#  "-\?"
-# followed by an optional combination of alphanumeric and "-" chars:
-#  "[[:alnum:]-]*"
-# e.g. 999-the-mark-of-fstests
-#
 VALID_TEST_ID="[0-9]\{3\}"
-VALID_TEST_NAME="$VALID_TEST_ID-\?[[:alnum:]-]*"
+VALID_TEST_NAME="$VALID_TEST_ID"
diff --git a/new b/new
index 6b50ffeda..c786a9dbb 100755
--- a/new
+++ b/new
@@ -50,30 +50,6 @@  export AWK_PROG="$(type -P awk)"
 echo "Next test id is $id"
 shift
 
-read -p "Append a name to the ID? Test name will be $id-\$name. y,[n]: " -r
-if [[ $REPLY = [Yy] ]]; then
-	# get the new name from user
-	name=""
-	while [ "$name" = "" ]; do
-		read -p "Enter the name: "
-		if [ "$REPLY" = "" ]; then
-			echo "For canceling, use ctrl+c."
-		elif echo "$id-$REPLY" | grep -q "^$VALID_TEST_NAME$"; then
-			if [ -e "$tdir/$id-$REPLY" ]; then
-				echo "File '$id-$REPLY' already exists, use another one."
-				echo
-			else
-				name="$REPLY"
-			fi
-		else
-			echo "A name can contain only alphanumeric symbols and dash!"
-			echo
-		fi
-	done
-
-	id="$id-$name"
-fi
-
 echo "Creating test file '$id'"
 
 if [ -f $tdir/$id ]