diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-10-28 06:34:22 -0700 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-12-03 10:11:18 -0800 |
commit | 6d40cc0cb4311d0c5aa4a106cc86a3d45a9ad86c (patch) | |
tree | dcbbd440ccea9f6b8272ada52bedcf0414fe4fa7 /tools/testing/selftests/rcutorture/bin/functions.sh | |
parent | f43f8f73510c1013fe9449d7732e8f73a75b6fde (diff) |
rcutorture: Flag errors and warnings with color coding
The output of the rcutorture scripts often requires interpretation, so
this commit simplifies this interpretation by tagging messages as
BUGs (colored red) or WARNINGs (colored yellow).
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/rcutorture/bin/functions.sh')
-rw-r--r-- | tools/testing/selftests/rcutorture/bin/functions.sh | 16 |
1 files changed, 16 insertions, 0 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 () { lscpu | grep '^CPU(s):' | sed -e 's/CPU(s)://' } +# print_bug +# +# Prints "BUG: " in red followed by remaining arguments +print_bug () { + printf '\033[031mBUG: \033[m' + echo $* +} + +# print_warning +# +# Prints "WARNING: " in yellow followed by remaining arguments +print_warning () { + printf '\033[033mWARNING: \033[m' + echo $* +} + # specify_qemu_cpus qemu-cmd qemu-args #cpus # # Appends a string containing "-smp XXX" to qemu-args, unless the incoming |