OSDN Git Service

torture: Fix kvm.sh --datestamp regex check
authorPaul E. McKenney <paulmck@kernel.org>
Sun, 28 Feb 2021 04:55:57 +0000 (20:55 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 22 Mar 2021 15:29:21 +0000 (08:29 -0700)
Some versions of grep are happy to interpret a nonsensically placed "-"
within a "[]" pattern as a dash, while others give an error message.
This commit therefore places the "-" at the end of the expression where
it was supposed to be in the first place.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/testing/selftests/rcutorture/bin/kvm.sh

index 0add163..6bf00a0 100755 (executable)
@@ -120,7 +120,7 @@ do
                shift
                ;;
        --datestamp)
-               checkarg --datestamp "(relative pathname)" "$#" "$2" '^[a-zA-Z0-9._-/]*$' '^--'
+               checkarg --datestamp "(relative pathname)" "$#" "$2" '^[a-zA-Z0-9._/-]*$' '^--'
                ds=$2
                shift
                ;;