mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
build: Allow alphanumeric test name suffixes
To allow test names to be more descriptive, allow a suffix to be added to the numeric name of the test. e.g. a test can be named "tests/generic/001-some-descriptive-name". Name suffixes are limited to alphanumeric characters and dash - the name is always prefixed with an unique id for easy identification of a specific test. Hence we can still use shorthand forms such as "generic/001" when referring to a test and be clearly understood. Signed-off-by: Jan Tulak <jtulak@redhat.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Reviewed-by: David Sterba <dsterba@suse.cz> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
@@ -22,6 +22,16 @@
|
||||
|
||||
BC=$(which bc 2> /dev/null) || BC=
|
||||
|
||||
# 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_NAME="[0-9]\{3\}-\?[[:alnum:]-]*"
|
||||
|
||||
_require_math()
|
||||
{
|
||||
if [ -z "$BC" ]; then
|
||||
|
||||
Reference in New Issue
Block a user