Skip to content

Commit f7dd164

Browse files
committed
torture: Make torture.sh create a properly formatted log file
Currently, if the torture.sh allmodconfig step fails, this is counted as an error (as it should be), but there is also an extraneous complaint about a missing log file. This commit therefore adds that log file, which is hoped to reduce confused reactions to the error report. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent cb0982e commit f7dd164

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

tools/testing/selftests/rcutorture/bin/torture.sh

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -330,20 +330,34 @@ then
330330
echo " --- allmodconfig:" Start `date` | tee -a $T/log
331331
amcdir="tools/testing/selftests/rcutorture/res/$ds/allmodconfig"
332332
mkdir -p "$amcdir"
333-
echo " --- make clean" > "$amcdir/Make.out" 2>&1
333+
echo " --- make clean" | tee $amcdir/log > "$amcdir/Make.out" 2>&1
334334
make -j$MAKE_ALLOTED_CPUS clean >> "$amcdir/Make.out" 2>&1
335-
echo " --- make allmodconfig" >> "$amcdir/Make.out" 2>&1
336-
cp .config $amcdir
337-
make -j$MAKE_ALLOTED_CPUS allmodconfig >> "$amcdir/Make.out" 2>&1
338-
echo " --- make " >> "$amcdir/Make.out" 2>&1
339-
make -j$MAKE_ALLOTED_CPUS >> "$amcdir/Make.out" 2>&1
340-
retcode="$?"
341-
echo $retcode > "$amcdir/Make.exitcode"
342-
if test "$retcode" == 0
335+
retcode=$?
336+
buildphase='"make clean"'
337+
if test "$retcode" -eq 0
338+
then
339+
echo " --- make allmodconfig" | tee -a $amcdir/log >> "$amcdir/Make.out" 2>&1
340+
cp .config $amcdir
341+
make -j$MAKE_ALLOTED_CPUS allmodconfig >> "$amcdir/Make.out" 2>&1
342+
retcode=$?
343+
buildphase='"make allmodconfig"'
344+
fi
345+
if test "$retcode" -eq 0
346+
then
347+
echo " --- make " | tee -a $amcdir/log >> "$amcdir/Make.out" 2>&1
348+
make -j$MAKE_ALLOTED_CPUS >> "$amcdir/Make.out" 2>&1
349+
retcode="$?"
350+
echo $retcode > "$amcdir/Make.exitcode"
351+
buildphase='"make"'
352+
fi
353+
if test "$retcode" -eq 0
343354
then
344355
echo "allmodconfig($retcode)" $amcdir >> $T/successes
356+
echo Success >> $amcdir/log
345357
else
346358
echo "allmodconfig($retcode)" $amcdir >> $T/failures
359+
echo " --- allmodconfig Test summary:" >> $amcdir/log
360+
echo " --- Summary: Exit code $retcode from $buildphase, see Make.out" >> $amcdir/log
347361
fi
348362
fi
349363

0 commit comments

Comments
 (0)