]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
torture: Make torture.sh --allmodconfig testing fail on warnings
authorPaul E. McKenney <paulmck@kernel.org>
Fri, 6 Jun 2025 10:47:11 +0000 (03:47 -0700)
committerNeeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
Wed, 16 Jul 2025 04:14:04 +0000 (09:44 +0530)
Currently, the torture.sh --allmodconfig testing looks solely at the
exit code from the kernel build, and thus fails to flag many compiler
warnings.  This commit therefore checks the kernel-build output for
compiler diagnostics.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
tools/testing/selftests/rcutorture/bin/torture.sh

index 39844d213da54a8170935ad54bc6a85967db8b96..611bc03a8dc705b87b00e7722ab4075e10e8eb64 100755 (executable)
@@ -438,6 +438,10 @@ then
                make -j$MAKE_ALLOTED_CPUS >> "$amcdir/Make.out" 2>&1
                retcode="$?"
                echo $retcode > "$amcdir/Make.exitcode"
+               if grep -E -q "Stop|ERROR|Error|error:|warning:" < "$amcdir/Make.out"
+               then
+                       retcode=99
+               fi
                buildphase='"make"'
        fi
        if test "$retcode" -eq 0