diff options
Diffstat (limited to 'tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh')
-rwxr-xr-x | tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh b/tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh index 6f50722f251f..28981007465b 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh @@ -30,21 +30,29 @@ editor=${EDITOR-vi} files= for i in ${rundir}/*/Make.out do - if egrep -q "error:|warning:" < $i + scenariodir="`dirname $i`" + scenariobasedir="`echo ${scenariodir} | sed -e 's/\.[0-9]*$//'`" + if grep -E -q "error:|warning:|^ld: .*undefined reference to" < $i then - egrep "error:|warning:" < $i > $i.diags + grep -E "error:|warning:|^ld: .*undefined reference to" < $i > $i.diags + files="$files $i.diags $i" + elif ! test -f ${scenariobasedir}/vmlinux && ! test -f ${scenariobasedir}/vmlinux.xz && ! test -f "${rundir}/re-run" + then + echo No ${scenariobasedir}/vmlinux file > $i.diags files="$files $i.diags $i" fi done if test -n "$files" then $editor $files + editorret=1 else echo No build errors. fi -if grep -q -e "--buildonly" < ${rundir}/log +if grep -q -e "--build-\?only" < ${rundir}/log && ! test -f "${rundir}/remote-log" then echo Build-only run, no console logs to check. + exit $editorret fi # Find console logs with errors @@ -62,5 +70,10 @@ then exit 1 else echo No errors in console logs. - exit 0 + if test -n "$editorret" + then + exit $editorret + else + exit 0 + fi fi |