diff options
Diffstat (limited to 'tools/testing')
5 files changed, 41 insertions, 12 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh index d0d19ebd2a94..963b6f04d4ef 100644 --- a/tools/testing/selftests/rcutorture/bin/functions.sh +++ b/tools/testing/selftests/rcutorture/bin/functions.sh | |||
| @@ -134,6 +134,22 @@ identify_qemu_vcpus () { | |||
| 134 | lscpu | grep '^CPU(s):' | sed -e 's/CPU(s)://' | 134 | lscpu | grep '^CPU(s):' | sed -e 's/CPU(s)://' |
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | # print_bug | ||
| 138 | # | ||
| 139 | # Prints "BUG: " in red followed by remaining arguments | ||
| 140 | print_bug () { | ||
| 141 | printf '\033[031mBUG: \033[m' | ||
| 142 | echo $* | ||
| 143 | } | ||
| 144 | |||
| 145 | # print_warning | ||
| 146 | # | ||
| 147 | # Prints "WARNING: " in yellow followed by remaining arguments | ||
| 148 | print_warning () { | ||
| 149 | printf '\033[033mWARNING: \033[m' | ||
| 150 | echo $* | ||
| 151 | } | ||
| 152 | |||
| 137 | # specify_qemu_cpus qemu-cmd qemu-args #cpus | 153 | # specify_qemu_cpus qemu-cmd qemu-args #cpus |
| 138 | # | 154 | # |
| 139 | # Appends a string containing "-smp XXX" to qemu-args, unless the incoming | 155 | # Appends a string containing "-smp XXX" to qemu-args, unless the incoming |
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh index 3df1581e78ae..46f97d33e1ba 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh | |||
| @@ -188,6 +188,5 @@ then | |||
| 188 | fi | 188 | fi |
| 189 | 189 | ||
| 190 | cp $builddir/console.log $resdir | 190 | cp $builddir/console.log $resdir |
| 191 | parse-rcutorture.sh $resdir/console.log $title >> $resdir/Warnings 2>&1 | 191 | parse-rcutorture.sh $resdir/console.log $title |
| 192 | parse-console.sh $resdir/console.log $title >> $resdir/Warnings 2>&1 | 192 | parse-console.sh $resdir/console.log $title |
| 193 | cat $resdir/Warnings | ||
diff --git a/tools/testing/selftests/rcutorture/bin/parse-build.sh b/tools/testing/selftests/rcutorture/bin/parse-build.sh index 2e0e9f7ebbb0..9da2c7ba3fce 100755 --- a/tools/testing/selftests/rcutorture/bin/parse-build.sh +++ b/tools/testing/selftests/rcutorture/bin/parse-build.sh | |||
| @@ -30,18 +30,28 @@ | |||
| 30 | T=$1 | 30 | T=$1 |
| 31 | title=$2 | 31 | title=$2 |
| 32 | 32 | ||
| 33 | . functions.sh | ||
| 34 | |||
| 33 | if grep -q CC < $T | 35 | if grep -q CC < $T |
| 34 | then | 36 | then |
| 35 | : | 37 | : |
| 36 | else | 38 | else |
| 37 | echo $title no build | 39 | print_bug $title no build |
| 38 | exit 1 | 40 | exit 1 |
| 39 | fi | 41 | fi |
| 40 | 42 | ||
| 41 | if egrep -q "error:|rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T | 43 | if grep -q "error:" < $T |
| 44 | then | ||
| 45 | print_bug $title build errors: | ||
| 46 | grep "error:" < $T | ||
| 47 | exit 2 | ||
| 48 | fi | ||
| 49 | exit 0 | ||
| 50 | |||
| 51 | if egrep -q "rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T | ||
| 42 | then | 52 | then |
| 43 | echo $title build errors: | 53 | print_warning $title build errors: |
| 44 | egrep "error:|rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T | 54 | egrep "rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T |
| 45 | exit 2 | 55 | exit 2 |
| 46 | fi | 56 | fi |
| 47 | exit 0 | 57 | exit 0 |
diff --git a/tools/testing/selftests/rcutorture/bin/parse-console.sh b/tools/testing/selftests/rcutorture/bin/parse-console.sh index bc1496fa1263..8f4be78f06b6 100755 --- a/tools/testing/selftests/rcutorture/bin/parse-console.sh +++ b/tools/testing/selftests/rcutorture/bin/parse-console.sh | |||
| @@ -31,9 +31,11 @@ trap 'rm -f $T' 0 | |||
| 31 | file="$1" | 31 | file="$1" |
| 32 | title="$2" | 32 | title="$2" |
| 33 | 33 | ||
| 34 | . functions.sh | ||
| 35 | |||
| 34 | egrep 'Badness|WARNING:|Warn|BUG|===========|Call Trace:|Oops:' < $file | grep -v 'ODEBUG: ' | grep -v 'Warning: unable to open an initial console' > $T | 36 | egrep 'Badness|WARNING:|Warn|BUG|===========|Call Trace:|Oops:' < $file | grep -v 'ODEBUG: ' | grep -v 'Warning: unable to open an initial console' > $T |
| 35 | if test -s $T | 37 | if test -s $T |
| 36 | then | 38 | then |
| 37 | echo Assertion failure in $file $title | 39 | print_warning Assertion failure in $file $title |
| 38 | cat $T | 40 | cat $T |
| 39 | fi | 41 | fi |
diff --git a/tools/testing/selftests/rcutorture/bin/parse-rcutorture.sh b/tools/testing/selftests/rcutorture/bin/parse-rcutorture.sh index 37368a046a9f..ac2f75a83225 100755 --- a/tools/testing/selftests/rcutorture/bin/parse-rcutorture.sh +++ b/tools/testing/selftests/rcutorture/bin/parse-rcutorture.sh | |||
| @@ -34,6 +34,8 @@ title="$2" | |||
| 34 | 34 | ||
| 35 | trap 'rm -f $T.seq' 0 | 35 | trap 'rm -f $T.seq' 0 |
| 36 | 36 | ||
| 37 | . functions.sh | ||
| 38 | |||
| 37 | # check for presence of rcutorture.txt file | 39 | # check for presence of rcutorture.txt file |
| 38 | 40 | ||
| 39 | if test -f "$file" -a -r "$file" | 41 | if test -f "$file" -a -r "$file" |
| @@ -49,7 +51,7 @@ fi | |||
| 49 | if grep -q FAILURE $file || grep -q -e '-torture.*!!!' $file | 51 | if grep -q FAILURE $file || grep -q -e '-torture.*!!!' $file |
| 50 | then | 52 | then |
| 51 | nerrs=`grep --binary-files=text '!!!' $file | tail -1 | awk '{for (i=NF-8;i<=NF;i++) sum+=$i; } END {print sum}'` | 53 | nerrs=`grep --binary-files=text '!!!' $file | tail -1 | awk '{for (i=NF-8;i<=NF;i++) sum+=$i; } END {print sum}'` |
| 52 | echo $title FAILURE, $nerrs instances | 54 | print_bug $title FAILURE, $nerrs instances |
| 53 | echo " " $url | 55 | echo " " $url |
| 54 | exit | 56 | exit |
| 55 | fi | 57 | fi |
| @@ -84,21 +86,21 @@ if grep -q SUCCESS $file | |||
| 84 | then | 86 | then |
| 85 | if test -s $T.seq | 87 | if test -s $T.seq |
| 86 | then | 88 | then |
| 87 | echo WARNING $title `cat $T.seq` | 89 | print_warning $title $title `cat $T.seq` |
| 88 | echo " " $file | 90 | echo " " $file |
| 89 | exit 2 | 91 | exit 2 |
| 90 | fi | 92 | fi |
| 91 | else | 93 | else |
| 92 | if grep -q RCU_HOTPLUG $file | 94 | if grep -q RCU_HOTPLUG $file |
| 93 | then | 95 | then |
| 94 | echo WARNING: HOTPLUG FAILURES $title `cat $T.seq` | 96 | print_warning HOTPLUG FAILURES $title `cat $T.seq` |
| 95 | echo " " $file | 97 | echo " " $file |
| 96 | exit 3 | 98 | exit 3 |
| 97 | fi | 99 | fi |
| 98 | echo $title no success message, `grep --binary-files=text 'ver:' $file | wc -l` successful RCU version messages | 100 | echo $title no success message, `grep --binary-files=text 'ver:' $file | wc -l` successful RCU version messages |
| 99 | if test -s $T.seq | 101 | if test -s $T.seq |
| 100 | then | 102 | then |
| 101 | echo WARNING $title `cat $T.seq` | 103 | print_warning $title `cat $T.seq` |
| 102 | fi | 104 | fi |
| 103 | exit 2 | 105 | exit 2 |
| 104 | fi | 106 | fi |
