]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
torture: Print informative message for test without recheck file
authorPaul E. McKenney <paulmck@kernel.org>
Tue, 27 Jan 2026 01:50:48 +0000 (17:50 -0800)
committerJoel Fernandes <joelagnelf@nvidia.com>
Mon, 30 Mar 2026 19:48:13 +0000 (15:48 -0400)
If a type of torture test lacks a recheck file, a bash diagnostic is
printed, which looks like a torture-test bug.  This commit gets rid of
this false positive by explicitly checking for the file, invoking it if
it exists, otherwise printing an informative non-diagnostic message.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
tools/testing/selftests/rcutorture/bin/kvm-recheck.sh

index 4791774b8485ab6d149dc79bea43fd4b05106420..63bbbdd5f4ef38c8f2d1ff70eb73d0f0059f5922 100755 (executable)
@@ -39,7 +39,12 @@ do
                X*)
                        ;;
                *)
-                       kvm-recheck-${TORTURE_SUITE}.sh $i
+                       if test -f tools/testing/selftests/rcutorture/bin/kvm-recheck-${TORTURE_SUITE}.sh
+                       then
+                               kvm-recheck-${TORTURE_SUITE}.sh $i
+                       else
+                               echo No kvm-recheck-${TORTURE_SUITE}.sh, so no ${TORTURE_SUITE}-specific analysis.
+                       fi
                esac
                if test -f "$i/qemu-retval" && test "`cat $i/qemu-retval`" -ne 0 && test "`cat $i/qemu-retval`" -ne 137
                then