All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/2] Block layer patches for 4.0-rc4
@ 2019-04-12 16:04 Kevin Wolf
  2019-04-12 16:04 ` [Qemu-devel] [PULL 1/2] iotests: Let 245 pass on tmpfs Kevin Wolf
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Kevin Wolf @ 2019-04-12 16:04 UTC (permalink / raw)
  To: qemu-block; +Cc: kwolf, peter.maydell, qemu-devel

The following changes since commit 13c24edaa742181af8d9c6b027ee366b04de1ea1:

  qemu-img: fix .hx and .texi disparity (2019-04-12 14:17:10 +0100)

are available in the Git repository at:

  git://repo.or.cz/qemu/kevin.git tags/for-upstream

for you to fetch changes up to 9749636b005d118259810afb92482df2fe0ae2ad:

  iotest: Fix 241 to run in generic directory (2019-04-12 18:03:01 +0200)

----------------------------------------------------------------
Block layer patches:

- iotests fixes

----------------------------------------------------------------
Eric Blake (1):
      iotest: Fix 241 to run in generic directory

Max Reitz (1):
      iotests: Let 245 pass on tmpfs

 tests/qemu-iotests/241     |  4 +++-
 tests/qemu-iotests/241.out |  6 +++---
 tests/qemu-iotests/245     | 10 ++++++++--
 3 files changed, 14 insertions(+), 6 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PULL 1/2] iotests: Let 245 pass on tmpfs
  2019-04-12 16:04 [Qemu-devel] [PULL 0/2] Block layer patches for 4.0-rc4 Kevin Wolf
@ 2019-04-12 16:04 ` Kevin Wolf
  2019-04-12 16:04 ` [Qemu-devel] [PULL 2/2] iotest: Fix 241 to run in generic directory Kevin Wolf
  2019-04-14 19:17   ` Peter Maydell
  2 siblings, 0 replies; 5+ messages in thread
From: Kevin Wolf @ 2019-04-12 16:04 UTC (permalink / raw)
  To: qemu-block; +Cc: kwolf, peter.maydell, qemu-devel

From: Max Reitz <mreitz@redhat.com>

tmpfs does not support O_DIRECT.  Detect this case, and skip flipping
@direct if the filesystem does not support it.

Fixes: bf3e50f6239090e63a8ffaaec971671e66d88e07
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 tests/qemu-iotests/245 | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/tests/qemu-iotests/245 b/tests/qemu-iotests/245
index 7891a210c1..a04c6235c1 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
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PULL 2/2] iotest: Fix 241 to run in generic directory
  2019-04-12 16:04 [Qemu-devel] [PULL 0/2] Block layer patches for 4.0-rc4 Kevin Wolf
  2019-04-12 16:04 ` [Qemu-devel] [PULL 1/2] iotests: Let 245 pass on tmpfs Kevin Wolf
@ 2019-04-12 16:04 ` Kevin Wolf
  2019-04-14 19:17   ` Peter Maydell
  2 siblings, 0 replies; 5+ messages in thread
From: Kevin Wolf @ 2019-04-12 16:04 UTC (permalink / raw)
  To: qemu-block; +Cc: kwolf, peter.maydell, qemu-devel

From: Eric Blake <eblake@redhat.com>

Filter the qemu-nbd server output to get rid of a direct reference
to my build directory.

Fixes: e9dce9cb
Reported-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 tests/qemu-iotests/241     | 4 +++-
 tests/qemu-iotests/241.out | 6 +++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/tests/qemu-iotests/241 b/tests/qemu-iotests/241
index 4b19685738..017a736aab 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 f481074a02..75f9f465e5 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 ===
 
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PULL 0/2] Block layer patches for 4.0-rc4
@ 2019-04-14 19:17   ` Peter Maydell
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2019-04-14 19:17 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: Qemu-block, QEMU Developers

On Fri, 12 Apr 2019 at 17:05, Kevin Wolf <kwolf@redhat.com> wrote:
>
> The following changes since commit 13c24edaa742181af8d9c6b027ee366b04de1ea1:
>
>   qemu-img: fix .hx and .texi disparity (2019-04-12 14:17:10 +0100)
>
> are available in the Git repository at:
>
>   git://repo.or.cz/qemu/kevin.git tags/for-upstream
>
> for you to fetch changes up to 9749636b005d118259810afb92482df2fe0ae2ad:
>
>   iotest: Fix 241 to run in generic directory (2019-04-12 18:03:01 +0200)
>
> ----------------------------------------------------------------
> Block layer patches:
>
> - iotests fixes

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/4.0
for any user-visible changes.

-- PMM

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PULL 0/2] Block layer patches for 4.0-rc4
@ 2019-04-14 19:17   ` Peter Maydell
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2019-04-14 19:17 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: QEMU Developers, Qemu-block

On Fri, 12 Apr 2019 at 17:05, Kevin Wolf <kwolf@redhat.com> wrote:
>
> The following changes since commit 13c24edaa742181af8d9c6b027ee366b04de1ea1:
>
>   qemu-img: fix .hx and .texi disparity (2019-04-12 14:17:10 +0100)
>
> are available in the Git repository at:
>
>   git://repo.or.cz/qemu/kevin.git tags/for-upstream
>
> for you to fetch changes up to 9749636b005d118259810afb92482df2fe0ae2ad:
>
>   iotest: Fix 241 to run in generic directory (2019-04-12 18:03:01 +0200)
>
> ----------------------------------------------------------------
> Block layer patches:
>
> - iotests fixes

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/4.0
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-04-14 19:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-12 16:04 [Qemu-devel] [PULL 0/2] Block layer patches for 4.0-rc4 Kevin Wolf
2019-04-12 16:04 ` [Qemu-devel] [PULL 1/2] iotests: Let 245 pass on tmpfs Kevin Wolf
2019-04-12 16:04 ` [Qemu-devel] [PULL 2/2] iotest: Fix 241 to run in generic directory Kevin Wolf
2019-04-14 19:17 ` [Qemu-devel] [PULL 0/2] Block layer patches for 4.0-rc4 Peter Maydell
2019-04-14 19:17   ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.