diff options
-rwxr-xr-x | bin/oops_check.sh | 12 | ||||
-rw-r--r-- | units/miscellanea/jobs.pxu | 8 |
2 files changed, 16 insertions, 4 deletions
diff --git a/bin/oops_check.sh b/bin/oops_check.sh new file mode 100755 index 00000000..1903db16 --- /dev/null +++ b/bin/oops_check.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +retcode=0 + +## check for Oopses +grep -e 'kernel: \[\s*[0-9]\{2,\}\.[0-9]\{2,\}\] [Oo]ops:' /var/log/syslog +if [ $? -eq 0 ]; then + retcode=1 +fi + +exit $retcode + diff --git a/units/miscellanea/jobs.pxu b/units/miscellanea/jobs.pxu index 10df43dd..6727683d 100644 --- a/units/miscellanea/jobs.pxu +++ b/units/miscellanea/jobs.pxu @@ -365,10 +365,10 @@ _summary: Attach the baseline sosreport file plugin: shell category_id: com.canonical.plainbox::miscellanea estimated_duration: 0.5 -id: miscellanea/call-trace-check -command: if [ -n "$(grep "Call Trace:" /var/log/syslog)" ]; then echo "Call Trace detected in syslog"; false; else true; fi -_summary: Check syslog for call traces -_description: Checks syslog for call traces after testing is complete. +id: miscellanea/oops-check +command: oops_check.sh +_summary: Check syslog for oopses +_description: Checks syslog for oopses after testing is complete. flags: preserve-locale plugin: attachment |