Skip to content

Commit

Permalink
hijack.sh: fail if the logger trace is empty
Browse files Browse the repository at this point in the history
Does not completely fixes thesofproject#297 but goes a long way.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
  • Loading branch information
marc-hb committed Sep 18, 2020
1 parent a2669ff commit b43659e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions case-lib/hijack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ function func_exit_handler()
# shellcheck disable=SC2154
wcLog=$(wc -l "$logfile")
dlogi "nlines=$wcLog"
nlines=$(cat "$logfile" | wc -l)
# Line 1 is the header
if [ "$nlines" -le 1 ]; then
dloge "Empty logger trace"
exit_status=1
fi
fi
# when case ends, store kernel log
# /var/log/kern.log format:
Expand Down

0 comments on commit b43659e

Please sign in to comment.