[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/53] iotests: fix _check_o_direct
From: |
Max Reitz |
Subject: |
[PULL 01/53] iotests: fix _check_o_direct |
Date: |
Tue, 26 Jan 2021 15:19:24 +0100 |
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Unfortunately commit "iotests: handle tmpfs" breaks running iotests
with -nbd -nocache, as _check_o_direct tries to create
$TEST_IMG.test_o_direct, but in case of nbd TEST_IMG is something like
nbd+unix:///... , and test fails with message
qemu-img: nbd+unix:///?socket[...]test_o_direct: Protocol driver
'nbd' does not support image creation, and opening the image
failed: Failed to connect to '/tmp/tmp.[...]/nbd/test_o_direct': No
such file or directory
Use TEST_DIR instead.
Fixes: cfdca2b9f9d4ca26bb2b2dfe8de3149092e39170
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20201218182012.47607-1-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
tests/qemu-iotests/common.rc | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 29354654cc..297acf9b6a 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -821,9 +821,10 @@ _supported_cache_modes()
# Check whether the filesystem supports O_DIRECT
_check_o_direct()
{
- $QEMU_IMG create -f raw "$TEST_IMG".test_o_direct 1M > /dev/null
- out=$($QEMU_IO -f raw -t none -c quit "$TEST_IMG".test_o_direct 2>&1)
- rm -f "$TEST_IMG".test_o_direct
+ testfile="$TEST_DIR"/_check_o_direct
+ $QEMU_IMG create -f raw "$testfile" 1M > /dev/null
+ out=$($QEMU_IO -f raw -t none -c quit "$testfile" 2>&1)
+ rm -f "$testfile"
[[ "$out" != *"O_DIRECT"* ]]
}
--
2.29.2
- [PULL 00/53] Block patches, Max Reitz, 2021/01/26
- [PULL 01/53] iotests: fix _check_o_direct,
Max Reitz <=
- [PULL 02/53] copy-on-read: support preadv/pwritev_part functions, Max Reitz, 2021/01/26
- [PULL 03/53] block: add API function to insert a node, Max Reitz, 2021/01/26
- [PULL 04/53] copy-on-read: add filter drop function, Max Reitz, 2021/01/26
- [PULL 05/53] qapi: add filter-node-name to block-stream, Max Reitz, 2021/01/26
- [PULL 07/53] iotests: add #310 to test bottom node in COR driver, Max Reitz, 2021/01/26
- [PULL 06/53] qapi: copy-on-read filter: add 'bottom' option, Max Reitz, 2021/01/26
- [PULL 08/53] block: include supported_read_flags into BDS structure, Max Reitz, 2021/01/26
- [PULL 11/53] qapi: block-stream: add "bottom" argument, Max Reitz, 2021/01/26
- [PULL 16/53] iotests/297: Rewrite in Python and extend reach, Max Reitz, 2021/01/26
- [PULL 17/53] iotests: Move try_remove to iotests.py, Max Reitz, 2021/01/26