aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/common.config
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2017-09-12 16:44:54 +0200
committerKevin Wolf <kwolf@redhat.com>2017-10-06 16:28:58 +0200
commitd1f2447a3e8d0804838e2445f955996c925395ef (patch)
tree321a5c39f383cab36d29a53b975f8c073e896c39 /tests/qemu-iotests/common.config
parentcceaf1db6fbede3ed0bca103d12f8a19c1374e42 (diff)
downloadqemu-d1f2447a3e8d0804838e2445f955996c925395ef.zip
qemu-d1f2447a3e8d0804838e2445f955996c925395ef.tar.gz
qemu-d1f2447a3e8d0804838e2445f955996c925395ef.tar.bz2
qemu-iotests: limit non-_PROG-suffixed variables to common.rc
These are never used by "check", with one exception that does not need $QEMU_OPTIONS. Keep them in common.rc, which will be soon included only by the tests. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/common.config')
-rw-r--r--tests/qemu-iotests/common.config69
1 files changed, 2 insertions, 67 deletions
diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config
index c97c639..c7f0a7a 100644
--- a/tests/qemu-iotests/common.config
+++ b/tests/qemu-iotests/common.config
@@ -40,71 +40,6 @@ _optstr_add()
fi
}
-_qemu_wrapper()
-{
- (
- if [ -n "${QEMU_NEED_PID}" ]; then
- echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid"
- fi
- exec "$QEMU_PROG" $QEMU_OPTIONS "$@"
- )
-}
-
-_qemu_img_wrapper()
-{
- (exec "$QEMU_IMG_PROG" $QEMU_IMG_OPTIONS "$@")
-}
-
-_qemu_io_wrapper()
-{
- local VALGRIND_LOGFILE="${TEST_DIR}"/$$.valgrind
- local QEMU_IO_ARGS="$QEMU_IO_OPTIONS"
- if [ "$IMGOPTSSYNTAX" = "true" ]; then
- QEMU_IO_ARGS="--image-opts $QEMU_IO_ARGS"
- if [ -n "$IMGKEYSECRET" ]; then
- QEMU_IO_ARGS="--object secret,id=keysec0,data=$IMGKEYSECRET $QEMU_IO_ARGS"
- fi
- fi
- local RETVAL
- (
- if [ "${VALGRIND_QEMU}" == "y" ]; then
- exec valgrind --log-file="${VALGRIND_LOGFILE}" --error-exitcode=99 "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"
- else
- exec "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"
- fi
- )
- RETVAL=$?
- if [ "${VALGRIND_QEMU}" == "y" ]; then
- if [ $RETVAL == 99 ]; then
- cat "${VALGRIND_LOGFILE}"
- fi
- rm -f "${VALGRIND_LOGFILE}"
- fi
- (exit $RETVAL)
-}
-
-_qemu_nbd_wrapper()
-{
- (
- echo $BASHPID > "${QEMU_TEST_DIR}/qemu-nbd.pid"
- exec "$QEMU_NBD_PROG" $QEMU_NBD_OPTIONS "$@"
- )
-}
-
-_qemu_vxhs_wrapper()
-{
- (
- echo $BASHPID > "${TEST_DIR}/qemu-vxhs.pid"
- exec "$QEMU_VXHS_PROG" $QEMU_VXHS_OPTIONS "$@"
- )
-}
-
-export QEMU=_qemu_wrapper
-export QEMU_IMG=_qemu_img_wrapper
-export QEMU_IO=_qemu_io_wrapper
-export QEMU_NBD=_qemu_nbd_wrapper
-export QEMU_VXHS=_qemu_vxhs_wrapper
-
QEMU_IMG_EXTRA_ARGS=
if [ "$IMGOPTSSYNTAX" = "true" ]; then
QEMU_IMG_EXTRA_ARGS="--image-opts $QEMU_IMG_EXTRA_ARGS"
@@ -115,8 +50,8 @@ fi
export QEMU_IMG_EXTRA_ARGS
-default_machine=$($QEMU -machine help | sed -n '/(default)/ s/ .*//p')
-default_alias_machine=$($QEMU -machine help | \
+default_machine=$($QEMU_PROG -machine help | sed -n '/(default)/ s/ .*//p')
+default_alias_machine=$($QEMU_PROG -machine help | \
sed -n "/(alias of $default_machine)/ { s/ .*//p; q; }")
if [[ "$default_alias_machine" ]]; then
default_machine="$default_alias_machine"