mirror of
https://github.com/dgibson/dtc.git
synced 2026-04-12 00:47:46 -04:00
dtc: Make dtc-checfails.sh script catch deaths-by-signal
Since commit 5ba0086bfd, the
dtc-checkfails.sh script does not check the return code from dtc.
That's reasonable, since depending on the checks we're testing, dtc
could either complete succesfully or return an error.
However, it's never right for dtc to SEGV or otherwise be killed by a
signal. So the script should catch that, and fail the testcase if it
happens. This patch implements this behaviour.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
3476f9608b
commit
0d9d10184b
1 changed files with 4 additions and 0 deletions
|
|
@ -17,6 +17,10 @@ rm -f $TMPFILE $LOG
|
|||
verbose_run_log "$LOG" "$DTC" -o /dev/null "$@"
|
||||
ret="$?"
|
||||
|
||||
if [ "$ret" -gt 127 ]; then
|
||||
FAIL "dtc killed by signal (ret=$ret)"
|
||||
fi
|
||||
|
||||
for c in $CHECKS; do
|
||||
if ! grep -E "^(ERROR)|(Warning) \($c\):" $LOG > /dev/null; then
|
||||
FAIL "Failed to trigger check \"%c\""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue