diff options
author | Max Reitz <mreitz@redhat.com> | 2020-10-27 20:05:57 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2020-12-11 17:52:40 +0100 |
commit | cc575c3edb5467d7faf8a0ec813f81e4d598637b (patch) | |
tree | b74c8cf829e422bb95b81c171d6a4c4a2e5ee5d7 /tests/qemu-iotests/common.rc | |
parent | b55a3c8860b763b62b2cc2f4a6f55379977bbde5 (diff) | |
download | qemu-cc575c3edb5467d7faf8a0ec813f81e4d598637b.zip qemu-cc575c3edb5467d7faf8a0ec813f81e4d598637b.tar.gz qemu-cc575c3edb5467d7faf8a0ec813f81e4d598637b.tar.bz2 |
iotests: Give access to the qemu-storage-daemon
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20201027190600.192171-18-mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/common.rc')
-rw-r--r-- | tests/qemu-iotests/common.rc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 23f46da..20589e5 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -124,6 +124,7 @@ fi : ${VALGRIND_QEMU_IMG=$VALGRIND_QEMU} : ${VALGRIND_QEMU_IO=$VALGRIND_QEMU} : ${VALGRIND_QEMU_NBD=$VALGRIND_QEMU} +: ${VALGRIND_QSD=$VALGRIND_QEMU} # The Valgrind own parameters may be set with # its environment variable VALGRIND_OPTS, e.g. @@ -211,6 +212,21 @@ _qemu_nbd_wrapper() return $RETVAL } +_qemu_storage_daemon_wrapper() +{ + local VALGRIND_LOGFILE="${TEST_DIR}"/$$.valgrind + ( + if [ -n "${QSD_NEED_PID}" ]; then + echo $BASHPID > "${QEMU_TEST_DIR}/qemu-storage-daemon.pid" + fi + VALGRIND_QEMU="${VALGRIND_QSD}" _qemu_proc_exec "${VALGRIND_LOGFILE}" \ + "$QSD_PROG" $QSD_OPTIONS "$@" + ) + RETVAL=$? + _qemu_proc_valgrind_log "${VALGRIND_LOGFILE}" $RETVAL + return $RETVAL +} + # Valgrind bug #409141 https://bugs.kde.org/show_bug.cgi?id=409141 # Until valgrind 3.16+ is ubiquitous, we must work around a hang in # valgrind when issuing sigkill. Disable valgrind for this invocation. @@ -223,6 +239,7 @@ export QEMU=_qemu_wrapper export QEMU_IMG=_qemu_img_wrapper export QEMU_IO=_qemu_io_wrapper export QEMU_NBD=_qemu_nbd_wrapper +export QSD=_qemu_storage_daemon_wrapper if [ "$IMGOPTSSYNTAX" = "true" ]; then DRIVER="driver=$IMGFMT" |