[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 07/15] qemu-iotests: add gdbserver option to script tests too
From: |
Emanuele Giuseppe Esposito |
Subject: |
[PATCH v4 07/15] qemu-iotests: add gdbserver option to script tests too |
Date: |
Thu, 20 May 2021 09:52:28 +0200 |
The only limitation here is that running a script with gdbserver
will make the test output mismatch with the expected
results, making the test fail.
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
---
tests/qemu-iotests/common.rc | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 7f49c9716d..f1d5395ff2 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -166,8 +166,14 @@ _qemu_wrapper()
if [ -n "${QEMU_NEED_PID}" ]; then
echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid"
fi
+
+ GDB=""
+ if [ ! -z ${GDB_OPTIONS} ]; then
+ GDB="gdbserver ${GDB_OPTIONS}"
+ fi
+
VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
"${VALGRIND_LOGFILE}" \
- "$QEMU_PROG" $QEMU_OPTIONS "$@"
+ $GDB "$QEMU_PROG" $QEMU_OPTIONS "$@"
)
RETVAL=$?
_qemu_proc_valgrind_log "${VALGRIND_LOGFILE}" $RETVAL
--
2.30.2
- [PATCH v4 12/15] qemu-iotests: insert valgrind command line as wrapper for qemu binary, (continued)
- [PATCH v4 12/15] qemu-iotests: insert valgrind command line as wrapper for qemu binary, Emanuele Giuseppe Esposito, 2021/05/20
- [PATCH v4 14/15] qemu-iotests: add option to show qemu binary logs on stdout, Emanuele Giuseppe Esposito, 2021/05/20
- [PATCH v4 15/15] docs/devel/testing: add -p option to the debug section of QEMU iotests, Emanuele Giuseppe Esposito, 2021/05/20
- [PATCH v4 09/15] qemu-iotests: extend the check script to support valgrind for python tests, Emanuele Giuseppe Esposito, 2021/05/20
- [PATCH v4 07/15] qemu-iotests: add gdbserver option to script tests too,
Emanuele Giuseppe Esposito <=
- [PATCH v4 11/15] qemu-iotests: allow valgrind to read/delete the generated log file, Emanuele Giuseppe Esposito, 2021/05/20
- Re: [PATCH v4 00/15] qemu_iotests: improve debugging options, Vladimir Sementsov-Ogievskiy, 2021/05/26