torture: Print proper vmlinux path for kvm-again.sh runs
authorPaul E. McKenney <paulmck@kernel.org>
Tue, 23 Feb 2021 21:12:41 +0000 (13:12 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 22 Mar 2021 15:29:20 +0000 (08:29 -0700)
The kvm-again.sh script does not copy over the vmlinux files due to
their large size.  This means that a gdb run must use the vmlinux file
from the original "res" directory.  This commit therefore finds that
directory and prints it out so that the user can copy and pasted the
gdb command just as for the initial run.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/testing/selftests/rcutorture/bin/kvm-again.sh
tools/testing/selftests/rcutorture/bin/kvm-test-1-run-qemu.sh

index f1c80b02af58dc679d0028e3ca2f86539030dbbb..668636ee3dafbef3aa41f02425dc0c3ef4dbee17 100755 (executable)
@@ -159,7 +159,10 @@ do
        then
                echo "# seconds=$dur" >> $i
        fi
-       echo "# TORTURE_KCONFIG_GDB_ARG=''" >> $i
+       if test -n "$arg_remote"
+       then
+               echo "# TORTURE_KCONFIG_GDB_ARG=''" >> $i
+       fi
 done
 
 # Extract settings from the last qemu-cmd file transformed above.
index 576a9b761b415fb5058b62b9e54afc3c8c1ef914..5b1aa2a4f3f695b7d387f2cd56909bc5cd57222f 100755 (executable)
@@ -67,7 +67,11 @@ then
        base_resdir=`echo $resdir | sed -e 's/\.[0-9]\+$//'`
        if ! test -f $base_resdir/vmlinux
        then
-               base_resdir=/path/to
+               base_resdir="`cat re-run`/$resdir"
+               if ! test -f $base_resdir/vmlinux
+               then
+                       base_resdir=/path/to
+               fi
        fi
        echo Waiting for you to attach a debug session, for example: > /dev/tty
        echo "    gdb $base_resdir/vmlinux" > /dev/tty