[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 07/15] qemu-iotests: add gdbserver option to script tests too
From: |
Emanuele Giuseppe Esposito |
Subject: |
[PATCH v3 07/15] qemu-iotests: add gdbserver option to script tests too |
Date: |
Wed, 14 Apr 2021 19:03:44 +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 65cdba5723..53a3310fee 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="${QEMU_PROG}"
+ if [ ! -z ${GDB_QEMU} ]; then
+ GDB="gdbserver ${GDB_QEMU} ${GDB}"
+ fi
+
VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
"${VALGRIND_LOGFILE}" \
- "$QEMU_PROG" $QEMU_OPTIONS "$@"
+ $GDB $QEMU_OPTIONS "$@"
)
RETVAL=$?
_qemu_proc_valgrind_log "${VALGRIND_LOGFILE}" $RETVAL
--
2.30.2
- Re: [PATCH v3 03/15] docs/devel/testing: add debug section to the QEMU iotests chapter, (continued)
- [PATCH v3 04/15] qemu-iotests: add option to attach gdbserver, Emanuele Giuseppe Esposito, 2021/04/14
- [PATCH v3 05/15] qemu-iotests: delay QMP socket timers, Emanuele Giuseppe Esposito, 2021/04/14
- [PATCH v3 06/15] qemu_iotests: insert gdbserver command line as wrapper for qemu binary, Emanuele Giuseppe Esposito, 2021/04/14
- [PATCH v3 07/15] qemu-iotests: add gdbserver option to script tests too,
Emanuele Giuseppe Esposito <=
- [PATCH v3 08/15] docs/devel/testing: add -gdb option to the debugging section of QEMU iotests, Emanuele Giuseppe Esposito, 2021/04/14
- [PATCH v3 09/15] qemu_iotests: extend the check script to support valgrind for python tests, Emanuele Giuseppe Esposito, 2021/04/14
- [PATCH v3 14/15] qemu_iotests: add option to show qemu binary logs on stdout, Emanuele Giuseppe Esposito, 2021/04/14
- [PATCH v3 13/15] docs/devel/testing: add -valgrind option to the debug section of QEMU iotests, Emanuele Giuseppe Esposito, 2021/04/14