|
16 | 16 | T=/tmp/kvm-recheck.sh.$$
|
17 | 17 | trap 'rm -f $T' 0 2
|
18 | 18 |
|
| 19 | +configerrors=0 |
| 20 | + |
19 | 21 | PATH=`pwd`/tools/testing/selftests/rcutorture/bin:$PATH; export PATH
|
20 | 22 | . functions.sh
|
21 | 23 | for rd in "$@"
|
|
32 | 34 | fi
|
33 | 35 | TORTURE_SUITE="`cat $i/../torture_suite`" ; export TORTURE_SUITE
|
34 | 36 | configfile=`echo $i | sed -e 's,^.*/,,'`
|
35 |
| - rm -f $i/console.log.*.diags |
| 37 | + rm -f $i/console.log.*.diags $i/ConfigFragment.diags |
36 | 38 | case "${TORTURE_SUITE}" in
|
37 | 39 | X*)
|
38 | 40 | ;;
|
|
49 | 51 | then
|
50 | 52 | echo QEMU killed
|
51 | 53 | fi
|
52 |
| - configcheck.sh $i/.config $i/ConfigFragment > $T 2>&1 |
53 |
| - cat $T |
| 54 | + configcheck.sh $i/.config $i/ConfigFragment > $i/ConfigFragment.diags 2>&1 |
| 55 | + if test -s $i/ConfigFragment.diags |
| 56 | + then |
| 57 | + cat $i/ConfigFragment.diags |
| 58 | + configerrors=$((configerrors+1)) |
| 59 | + else |
| 60 | + rm $i/ConfigFragment.diags |
| 61 | + fi |
54 | 62 | if test -r $i/Make.oldconfig.err
|
55 | 63 | then
|
56 | 64 | cat $i/Make.oldconfig.err
|
|
65 | 73 | if test -f "$i/buildonly"
|
66 | 74 | then
|
67 | 75 | echo Build-only run, no boot/test
|
68 |
| - configcheck.sh $i/.config $i/ConfigFragment |
| 76 | + configcheck.sh $i/.config $i/ConfigFragment > $i/ConfigFragment.diags 2>&1 |
| 77 | + if test -s $i/ConfigFragment.diags |
| 78 | + then |
| 79 | + cat $i/ConfigFragment.diags |
| 80 | + configerrors=$((configerrors+1)) |
| 81 | + else |
| 82 | + rm $i/ConfigFragment.diags |
| 83 | + fi |
69 | 84 | parse-build.sh $i/Make.out $configfile
|
70 | 85 | elif test -f "$i/qemu-cmd"
|
71 | 86 | then
|
|
79 | 94 | done
|
80 | 95 | if test -f "$rd/kcsan.sum"
|
81 | 96 | then
|
82 |
| - if ! test -f $T |
| 97 | + if ! test -f $i/ConfigFragment.diags |
83 | 98 | then
|
84 | 99 | :
|
85 |
| - elif grep -q CONFIG_KCSAN=y $T |
| 100 | + elif grep -q CONFIG_KCSAN=y $i/ConfigFragment.diags |
86 | 101 | then
|
87 | 102 | echo "Compiler or architecture does not support KCSAN!"
|
88 | 103 | echo Did you forget to switch your compiler with '--kmake-arg CC=<cc-that-supports-kcsan>'?
|
|
94 | 109 | fi
|
95 | 110 | fi
|
96 | 111 | done
|
| 112 | + |
| 113 | +if test "$configerrors" -gt 0 |
| 114 | +then |
| 115 | + echo $configerrors runs with .config errors. |
| 116 | + ret=1 |
| 117 | +fi |
97 | 118 | EDITOR=echo kvm-find-errors.sh "${@: -1}" > $T 2>&1
|
98 | 119 | builderrors="`tr ' ' '\012' < $T | grep -c '/Make.out.diags'`"
|
99 | 120 | if test "$builderrors" -gt 0
|
100 | 121 | then
|
101 | 122 | echo $builderrors runs with build errors.
|
102 |
| - ret=1 |
| 123 | + ret=2 |
103 | 124 | fi
|
104 | 125 | runerrors="`tr ' ' '\012' < $T | grep -c '/console.log.diags'`"
|
105 | 126 | if test "$runerrors" -gt 0
|
106 | 127 | then
|
107 | 128 | echo $runerrors runs with runtime errors.
|
108 |
| - ret=2 |
| 129 | + ret=3 |
109 | 130 | fi
|
110 | 131 | exit $ret
|
0 commit comments