3 # Invoke a text editor on all console.log files for all runs with diagnostics,
4 # that is, on all such files having a console.log.diags counterpart.
5 # Note that both console.log.diags and console.log are passed to the
6 # editor (currently defaulting to "vi"), allowing the user to get an
7 # idea of what to search for in the console.log file.
9 # Usage: kvm-find-errors.sh directory
11 # The "directory" above should end with the date/time directory, for example,
12 # "tools/testing/selftests/rcutorture/res/2018.02.25-14:27:27".
15 if test -z "$rundir" -o ! -d "$rundir"
17 echo Usage: $0 directory
21 # Find builds with errors
23 for i in ${rundir}/*/Make.out
25 if egrep -q "error:|warning:" < $i
27 egrep "error:|warning:" < $i > $i.diags
28 files="$files $i.diags $i"
37 if grep -q -e "--buildonly" < ${rundir}/log
39 echo Build-only run, no console logs to check.
42 # Find console logs with errors
44 for i in ${rundir}/*/console.log
48 files="$files $i.diags $i"
55 echo No errors in console logs.