diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2019-04-12 17:06:49 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-04-12 17:06:49 +0100 |
commit | afccfc0c4c6134a7bc9da6375996b3b91d291de4 (patch) | |
tree | 141bdcb90e1cefa32e6e299051774961b9bb7f15 | |
parent | 13c24edaa742181af8d9c6b027ee366b04de1ea1 (diff) | |
parent | 9749636b005d118259810afb92482df2fe0ae2ad (diff) | |
download | qemu-afccfc0c4c6134a7bc9da6375996b3b91d291de4.zip qemu-afccfc0c4c6134a7bc9da6375996b3b91d291de4.tar.gz qemu-afccfc0c4c6134a7bc9da6375996b3b91d291de4.tar.bz2 |
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches:
- iotests fixes
# gpg: Signature made Fri 12 Apr 2019 17:04:09 BST
# gpg: using RSA key 7F09B272C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full]
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6
* remotes/kevin/tags/for-upstream:
iotest: Fix 241 to run in generic directory
iotests: Let 245 pass on tmpfs
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rwxr-xr-x | tests/qemu-iotests/241 | 4 | ||||
-rw-r--r-- | tests/qemu-iotests/241.out | 6 | ||||
-rw-r--r-- | tests/qemu-iotests/245 | 10 |
3 files changed, 14 insertions, 6 deletions
diff --git a/tests/qemu-iotests/241 b/tests/qemu-iotests/241 index 4b19685..017a736 100755 --- a/tests/qemu-iotests/241 +++ b/tests/qemu-iotests/241 @@ -28,6 +28,7 @@ nbd_unix_socket=$TEST_DIR/test_qemu_nbd_socket _cleanup() { _cleanup_test_img + rm -f "$TEST_DIR/server.log" nbd_server_stop } trap "_cleanup; exit \$status" 0 1 2 3 15 @@ -69,12 +70,13 @@ echo # Intentionally omit '-f' to force image probing, which in turn forces # sector alignment, here at the server. -nbd_server_start_unix_socket "$TEST_IMG_FILE" +nbd_server_start_unix_socket "$TEST_IMG_FILE" 2> "$TEST_DIR/server.log" $QEMU_NBD_PROG --list -k $nbd_unix_socket | grep '\(size\|min\)' $QEMU_IMG map -f raw --output=json "$TEST_IMG" | _filter_qemu_img_map $QEMU_IO -f raw -c map "$TEST_IMG" nbd_server_stop +cat "$TEST_DIR/server.log" | _filter_testdir echo echo "=== Exporting unaligned raw image, forced client sector alignment ===" diff --git a/tests/qemu-iotests/241.out b/tests/qemu-iotests/241.out index f481074..75f9f46 100644 --- a/tests/qemu-iotests/241.out +++ b/tests/qemu-iotests/241.out @@ -10,13 +10,13 @@ QA output created by 241 === Exporting unaligned raw image, forced server sector alignment === -WARNING: Image format was not specified for '/home/eblake/qemu/tests/qemu-iotests/scratch/t.raw' and probing guessed raw. - Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. - Specify the 'raw' format explicitly to remove the restrictions. size: 1024 min block: 512 [{ "start": 0, "length": 1024, "depth": 0, "zero": false, "data": true, "offset": OFFSET}] 1 KiB (0x400) bytes allocated at offset 0 bytes (0x0) +WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw. + Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. + Specify the 'raw' format explicitly to remove the restrictions. === Exporting unaligned raw image, forced client sector alignment === diff --git a/tests/qemu-iotests/245 b/tests/qemu-iotests/245 index 7891a21..a04c623 100644 --- a/tests/qemu-iotests/245 +++ b/tests/qemu-iotests/245 @@ -209,6 +209,12 @@ class TestBlockdevReopen(iotests.QMPTestCase): # Reopen an image several times changing some of its options def test_reopen(self): + # Check whether the filesystem supports O_DIRECT + if 'O_DIRECT' in qemu_io('-f', 'raw', '-t', 'none', '-c', 'quit', hd_path[0]): + supports_direct = False + else: + supports_direct = True + # Open the hd1 image passing all backing options opts = hd_opts(1) opts['backing'] = hd_opts(0) @@ -231,9 +237,9 @@ class TestBlockdevReopen(iotests.QMPTestCase): self.assert_qmp(self.get_node('hd1'), 'cache/writeback', True) self.assert_qmp(self.get_node('hd1'), 'cache/direct', False) self.assert_qmp(self.get_node('hd1'), 'cache/no-flush', False) - self.reopen(opts, {'cache': { 'direct': True, 'no-flush': True }}) + self.reopen(opts, {'cache': { 'direct': supports_direct, 'no-flush': True }}) self.assert_qmp(self.get_node('hd1'), 'cache/writeback', True) - self.assert_qmp(self.get_node('hd1'), 'cache/direct', True) + self.assert_qmp(self.get_node('hd1'), 'cache/direct', supports_direct) self.assert_qmp(self.get_node('hd1'), 'cache/no-flush', True) # Reopen again with the original options |