diff options
Diffstat (limited to 'tests/qemu-iotests/common.rc')
-rw-r--r-- | tests/qemu-iotests/common.rc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 3213765..a3d904f 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -193,11 +193,11 @@ _cleanup_test_img() case "$IMGPROTO" in nbd) - if [ -f "${TEST_DIR}/qemu-nbd.pid" ]; then + if [ -f "${QEMU_TEST_DIR}/qemu-nbd.pid" ]; then local QEMU_NBD_PID - read QEMU_NBD_PID < "${TEST_DIR}/qemu-nbd.pid" + read QEMU_NBD_PID < "${QEMU_TEST_DIR}/qemu-nbd.pid" kill ${QEMU_NBD_PID} - rm -f "${TEST_DIR}/qemu-nbd.pid" + rm -f "${QEMU_TEST_DIR}/qemu-nbd.pid" fi rm -f "$TEST_IMG_FILE" ;; @@ -355,6 +355,17 @@ _supported_fmt() _notrun "not suitable for this image format: $IMGFMT" } +# tests whether $IMGFMT is one of the unsupported image format for a test +# +_unsupported_fmt() +{ + for f; do + if [ "$f" = "$IMGFMT" ]; then + _notrun "not suitable for this image format: $IMGFMT" + fi + done +} + # tests whether $IMGPROTO is one of the supported image protocols for a test # _supported_proto() |