torture: Declare parse-console.sh independence from rcutorture
authorPaul E. McKenney <paulmck@kernel.org>
Tue, 30 Jun 2020 20:37:22 +0000 (13:37 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Tue, 25 Aug 2020 01:38:31 +0000 (18:38 -0700)
Currently, parse-torture.sh looks at the fifth field of torture-test
console output for the version number.  This works fine for rcutorture,
but not for scftorture, which lacks the pointer field.  This commit
therefore adjusts matching lines so that the parse-console.sh awk script
always sees the version number as the first field in the lines passed
to it.

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

index 71a9f43..4e081a2 100755 (executable)
@@ -67,6 +67,7 @@ then
        grep --binary-files=text 'torture:.*ver:' $file |
        egrep --binary-files=text -v '\(null\)|rtc: 000000000* ' |
        sed -e 's/^(initramfs)[^]]*] //' -e 's/^\[[^]]*] //' |
+       sed -e 's/^.*ver: //' |
        awk '
        BEGIN   {
                ver = 0;
@@ -74,13 +75,13 @@ then
                }
 
                {
-               if (!badseq && ($5 + 0 != $5 || $5 <= ver)) {
+               if (!badseq && ($1 + 0 != $1 || $1 <= ver)) {
                        badseqno1 = ver;
-                       badseqno2 = $5;
+                       badseqno2 = $1;
                        badseqnr = NR;
                        badseq = 1;
                }
-               ver = $5
+               ver = $1
                }
 
        END     {