aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/common.qemu
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qemu-iotests/common.qemu')
-rw-r--r--tests/qemu-iotests/common.qemu9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/qemu-iotests/common.qemu b/tests/qemu-iotests/common.qemu
index 76ef298d3f..7645f1dc72 100644
--- a/tests/qemu-iotests/common.qemu
+++ b/tests/qemu-iotests/common.qemu
@@ -153,14 +153,19 @@ function _launch_qemu()
mkfifo "${fifo_out}"
mkfifo "${fifo_in}"
+ object_options=
+ if [ -n "$IMGKEYSECRET" ]; then
+ object_options="--object secret,id=keysec0,data=$IMGKEYSECRET"
+ fi
+
if [ -z "$keep_stderr" ]; then
QEMU_NEED_PID='y'\
- ${QEMU} -nographic -serial none ${comm} "${@}" >"${fifo_out}" \
+ ${QEMU} ${object_options} -nographic -serial none ${comm} "${@}" >"${fifo_out}" \
2>&1 \
<"${fifo_in}" &
elif [ "$keep_stderr" = "y" ]; then
QEMU_NEED_PID='y'\
- ${QEMU} -nographic -serial none ${comm} "${@}" >"${fifo_out}" \
+ ${QEMU} ${object_options} -nographic -serial none ${comm} "${@}" >"${fifo_out}" \
<"${fifo_in}" &
else
exit 1