[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 21/34] iotests: Give access to the qemu-storage-daemon
From: |
Kevin Wolf |
Subject: |
[PULL 21/34] iotests: Give access to the qemu-storage-daemon |
Date: |
Fri, 11 Dec 2020 18:07:59 +0100 |
From: Max Reitz <mreitz@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20201027190600.192171-18-mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
tests/qemu-iotests/check | 11 +++++++++++
tests/qemu-iotests/common.rc | 17 +++++++++++++++++
2 files changed, 28 insertions(+)
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index 678b6e4910..3c1fa4435a 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -644,6 +644,17 @@ if [ -z $QEMU_NBD_PROG ]; then
fi
export QEMU_NBD_PROG="$(type -p "$QEMU_NBD_PROG")"
+if [ -z "$QSD_PROG" ]; then
+ if [ -x "$build_iotests/qemu-storage-daemon" ]; then
+ export QSD_PROG="$build_iotests/qemu-storage-daemon"
+ elif [ -x "$build_root/storage-daemon/qemu-storage-daemon" ]; then
+ export QSD_PROG="$build_root/storage-daemon/qemu-storage-daemon"
+ else
+ _init_error "qemu-storage-daemon not found"
+ fi
+fi
+export QSD_PROG="$(type -p "$QSD_PROG")"
+
if [ -x "$build_iotests/socket_scm_helper" ]
then
export SOCKET_SCM_HELPER="$build_iotests/socket_scm_helper"
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 23f46da2db..20589e59a5 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"
--
2.29.2
- [PULL 17/34] iotests: Restrict some Python tests to file, (continued)
- [PULL 17/34] iotests: Restrict some Python tests to file, Kevin Wolf, 2020/12/11
- [PULL 18/34] iotests: Let _make_test_img guess $TEST_IMG_FILE, Kevin Wolf, 2020/12/11
- [PULL 20/34] storage-daemon: Call bdrv_close_all() on exit, Kevin Wolf, 2020/12/11
- [PULL 16/34] iotests/091: Use _cleanup_qemu instad of "wait", Kevin Wolf, 2020/12/11
- [PULL 26/34] iotests/221: Discard image before qemu-img map, Kevin Wolf, 2020/12/11
- [PULL 24/34] iotests/308: Add test for FUSE exports, Kevin Wolf, 2020/12/11
- [PULL 19/34] iotests/287: Clean up subshell test image, Kevin Wolf, 2020/12/11
- [PULL 25/34] file-posix: check the use_lock before setting the file lock, Kevin Wolf, 2020/12/11
- [PULL 27/34] can-host: Fix crash when 'canbus' property is not set, Kevin Wolf, 2020/12/11
- [PULL 22/34] iotests: Allow testing FUSE exports, Kevin Wolf, 2020/12/11
- [PULL 21/34] iotests: Give access to the qemu-storage-daemon,
Kevin Wolf <=
- [PULL 23/34] iotests: Enable fuse for many tests, Kevin Wolf, 2020/12/11
- [PULL 28/34] block/file-posix: fix workaround in raw_do_pwrite_zeroes(), Kevin Wolf, 2020/12/11
- [PULL 29/34] block/io: bdrv_refresh_limits(): use ERRP_GUARD, Kevin Wolf, 2020/12/11
- [PULL 31/34] block: introduce BDRV_MAX_LENGTH, Kevin Wolf, 2020/12/11
- [PULL 34/34] block: Fix deadlock in bdrv_co_yield_to_drain(), Kevin Wolf, 2020/12/11
- [PULL 32/34] block: Simplify qmp_block_resize() error paths, Kevin Wolf, 2020/12/11
- [PULL 33/34] block: Fix locking in qmp_block_resize(), Kevin Wolf, 2020/12/11
- [PULL 30/34] block/io: bdrv_check_byte_request(): drop bdrv_is_inserted(), Kevin Wolf, 2020/12/11
- Re: [PULL 00/34] Block layer patches, Peter Maydell, 2020/12/12