From b677bdd1bb95f1bc70a9d666f0ffb42ca2f3a2b0 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Mon, 24 Mar 2014 14:13:07 -0700 Subject: [PATCH] internal: ignore binary junk in kernel logs NUL bytes can show up here after powercycle testing Signed-off-by: Josh Durgin --- teuthology/task/internal.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/teuthology/task/internal.py b/teuthology/task/internal.py index 4bcb89ecfd..00b179a224 100644 --- a/teuthology/task/internal.py +++ b/teuthology/task/internal.py @@ -488,9 +488,13 @@ kern.* -{adir}/syslog/kern.log;RSYSLOG_FileFormat log.debug('Checking %s', remote.name) r = remote.run( args=[ + 'cat', + run.Raw('{adir}/syslog/*.log'.format(adir=archive_dir)), + run.Raw('|'), + 'tr', '[\\000-\\011\\013-\\037\\177-\\377]', '.', + run.Raw('|'), 'egrep', '\\bBUG\\b|\\bINFO\\b|\\bDEADLOCK\\b', - run.Raw('{adir}/syslog/*.log'.format(adir=archive_dir)), run.Raw('|'), 'grep', '-v', 'task .* blocked for more than .* seconds', run.Raw('|'), -- 2.39.5