summaryrefslogtreecommitdiff
diff options
authorJeff Lane <jeffrey.lane@canonical.com>2018-03-28 11:42:00 -0400
committerJeff Lane <jeffrey.lane@canonical.com>2018-03-28 11:42:00 -0400
commit9a780d7de74a2dd870a6c4665479096d44c41381 (patch)
tree165c82b35f9f9e9b1a62e7f7864e6db87470c4c9
parent0b1326cda4fda4d765650b1d32237e1845c03af3 (diff)
Replace call_trace_check with more reliable oops_check.sh script and matching job definition. LP: #1759614
-rwxr-xr-xbin/oops_check.sh12
-rw-r--r--units/miscellanea/jobs.pxu8
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