All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] iotests: Let 245 pass on tmpfs
@ 2019-04-10 16:29 ` Max Reitz
  0 siblings, 0 replies; 12+ messages in thread
From: Max Reitz @ 2019-04-10 16:29 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel, Max Reitz, Alberto Garcia, Kevin Wolf

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>
---
 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] 12+ messages in thread

* [Qemu-devel] [PATCH] iotests: Let 245 pass on tmpfs
@ 2019-04-10 16:29 ` Max Reitz
  0 siblings, 0 replies; 12+ messages in thread
From: Max Reitz @ 2019-04-10 16:29 UTC (permalink / raw)
  To: qemu-block; +Cc: Kevin Wolf, Alberto Garcia, qemu-devel, Max Reitz

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>
---
 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] 12+ messages in thread

* Re: [Qemu-devel] [PATCH for-4.0?] iotests: Let 245 pass on tmpfs
@ 2019-04-10 16:39   ` Eric Blake
  0 siblings, 0 replies; 12+ messages in thread
From: Eric Blake @ 2019-04-10 16:39 UTC (permalink / raw)
  To: Max Reitz, qemu-block
  Cc: Kevin Wolf, Alberto Garcia, qemu-devel, Peter Maydell

[-- Attachment #1: Type: text/plain, Size: 796 bytes --]

On 4/10/19 11:29 AM, Max Reitz wrote:
> 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>
> ---
>  tests/qemu-iotests/245 | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)

Are you trying to get this in 4.0-rc3? (As a test, it has no bearing on
the actual binaries; fewer testsuite failures are nice if we squeeze it
in, but at the same time it is not enough to delay the release if it
does not get fixed until 4.1).

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [Qemu-devel] [PATCH for-4.0?] iotests: Let 245 pass on tmpfs
@ 2019-04-10 16:39   ` Eric Blake
  0 siblings, 0 replies; 12+ messages in thread
From: Eric Blake @ 2019-04-10 16:39 UTC (permalink / raw)
  To: Max Reitz, qemu-block
  Cc: Kevin Wolf, Peter Maydell, Alberto Garcia, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 796 bytes --]

On 4/10/19 11:29 AM, Max Reitz wrote:
> 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>
> ---
>  tests/qemu-iotests/245 | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)

Are you trying to get this in 4.0-rc3? (As a test, it has no bearing on
the actual binaries; fewer testsuite failures are nice if we squeeze it
in, but at the same time it is not enough to delay the release if it
does not get fixed until 4.1).

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [Qemu-devel] [PATCH for-4.0?] iotests: Let 245 pass on tmpfs
@ 2019-04-10 16:39     ` Max Reitz
  0 siblings, 0 replies; 12+ messages in thread
From: Max Reitz @ 2019-04-10 16:39 UTC (permalink / raw)
  To: Eric Blake, qemu-block
  Cc: Kevin Wolf, Alberto Garcia, qemu-devel, Peter Maydell

[-- Attachment #1: Type: text/plain, Size: 865 bytes --]

On 10.04.19 18:39, Eric Blake wrote:
> On 4/10/19 11:29 AM, Max Reitz wrote:
>> 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>
>> ---
>>  tests/qemu-iotests/245 | 10 ++++++++--
>>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> Are you trying to get this in 4.0-rc3? (As a test, it has no bearing on
> the actual binaries; fewer testsuite failures are nice if we squeeze it
> in, but at the same time it is not enough to delay the release if it
> does not get fixed until 4.1).
> 
> Reviewed-by: Eric Blake <eblake@redhat.com>

If there are other patches for rc3, we could take this as well.  But
there is no point in making a pull request just for this.

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [Qemu-devel] [PATCH for-4.0?] iotests: Let 245 pass on tmpfs
@ 2019-04-10 16:39     ` Max Reitz
  0 siblings, 0 replies; 12+ messages in thread
From: Max Reitz @ 2019-04-10 16:39 UTC (permalink / raw)
  To: Eric Blake, qemu-block
  Cc: Kevin Wolf, Peter Maydell, Alberto Garcia, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 865 bytes --]

On 10.04.19 18:39, Eric Blake wrote:
> On 4/10/19 11:29 AM, Max Reitz wrote:
>> 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>
>> ---
>>  tests/qemu-iotests/245 | 10 ++++++++--
>>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> Are you trying to get this in 4.0-rc3? (As a test, it has no bearing on
> the actual binaries; fewer testsuite failures are nice if we squeeze it
> in, but at the same time it is not enough to delay the release if it
> does not get fixed until 4.1).
> 
> Reviewed-by: Eric Blake <eblake@redhat.com>

If there are other patches for rc3, we could take this as well.  But
there is no point in making a pull request just for this.

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [Qemu-devel] [PATCH for-4.0?] iotests: Let 245 pass on tmpfs
@ 2019-04-10 16:55       ` Peter Maydell
  0 siblings, 0 replies; 12+ messages in thread
From: Peter Maydell @ 2019-04-10 16:55 UTC (permalink / raw)
  To: Max Reitz
  Cc: Eric Blake, Qemu-block, Kevin Wolf, Alberto Garcia,
	QEMU Developers

On Wed, 10 Apr 2019 at 17:40, Max Reitz <mreitz@redhat.com> wrote:
>
> On 10.04.19 18:39, Eric Blake wrote:
> > On 4/10/19 11:29 AM, Max Reitz wrote:
> >> 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>
> >> ---
> >>  tests/qemu-iotests/245 | 10 ++++++++--
> >>  1 file changed, 8 insertions(+), 2 deletions(-)
> >
> > Are you trying to get this in 4.0-rc3? (As a test, it has no bearing on
> > the actual binaries; fewer testsuite failures are nice if we squeeze it
> > in, but at the same time it is not enough to delay the release if it
> > does not get fixed until 4.1).
> >
> > Reviewed-by: Eric Blake <eblake@redhat.com>
>
> If there are other patches for rc3, we could take this as well.  But
> there is no point in making a pull request just for this.

rc3 has been tagged already, I'm afraid. rc4 will be only
if something release-critical crops up.

thanks
-- PMM

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

* Re: [Qemu-devel] [PATCH for-4.0?] iotests: Let 245 pass on tmpfs
@ 2019-04-10 16:55       ` Peter Maydell
  0 siblings, 0 replies; 12+ messages in thread
From: Peter Maydell @ 2019-04-10 16:55 UTC (permalink / raw)
  To: Max Reitz; +Cc: Kevin Wolf, Alberto Garcia, QEMU Developers, Qemu-block

On Wed, 10 Apr 2019 at 17:40, Max Reitz <mreitz@redhat.com> wrote:
>
> On 10.04.19 18:39, Eric Blake wrote:
> > On 4/10/19 11:29 AM, Max Reitz wrote:
> >> 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>
> >> ---
> >>  tests/qemu-iotests/245 | 10 ++++++++--
> >>  1 file changed, 8 insertions(+), 2 deletions(-)
> >
> > Are you trying to get this in 4.0-rc3? (As a test, it has no bearing on
> > the actual binaries; fewer testsuite failures are nice if we squeeze it
> > in, but at the same time it is not enough to delay the release if it
> > does not get fixed until 4.1).
> >
> > Reviewed-by: Eric Blake <eblake@redhat.com>
>
> If there are other patches for rc3, we could take this as well.  But
> there is no point in making a pull request just for this.

rc3 has been tagged already, I'm afraid. rc4 will be only
if something release-critical crops up.

thanks
-- PMM


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

* Re: [Qemu-devel] [PATCH] iotests: Let 245 pass on tmpfs
@ 2019-04-11 12:44   ` Alberto Garcia
  0 siblings, 0 replies; 12+ messages in thread
From: Alberto Garcia @ 2019-04-11 12:44 UTC (permalink / raw)
  To: Max Reitz, qemu-block; +Cc: qemu-devel, Kevin Wolf

On Wed 10 Apr 2019 06:29:18 PM CEST, Max Reitz wrote:
>      # 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

I don't see any other test needing this at the moment (at least none
written in Python), but I wonder if this is something worth having in
iotests.py.

The patch looks fine anyway.

Reviewed-by: Alberto Garcia <berto@igalia.com>

Berto

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

* Re: [Qemu-devel] [PATCH] iotests: Let 245 pass on tmpfs
@ 2019-04-11 12:44   ` Alberto Garcia
  0 siblings, 0 replies; 12+ messages in thread
From: Alberto Garcia @ 2019-04-11 12:44 UTC (permalink / raw)
  To: Max Reitz, qemu-block; +Cc: Kevin Wolf, qemu-devel, Max Reitz

On Wed 10 Apr 2019 06:29:18 PM CEST, Max Reitz wrote:
>      # 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

I don't see any other test needing this at the moment (at least none
written in Python), but I wonder if this is something worth having in
iotests.py.

The patch looks fine anyway.

Reviewed-by: Alberto Garcia <berto@igalia.com>

Berto


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

* Re: [Qemu-devel] [PATCH] iotests: Let 245 pass on tmpfs
@ 2019-04-11 13:29   ` Kevin Wolf
  0 siblings, 0 replies; 12+ messages in thread
From: Kevin Wolf @ 2019-04-11 13:29 UTC (permalink / raw)
  To: Max Reitz; +Cc: qemu-block, qemu-devel, Alberto Garcia

Am 10.04.2019 um 18:29 hat Max Reitz geschrieben:
> 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>

Thanks, applied to the block branch.

Kevin

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

* Re: [Qemu-devel] [PATCH] iotests: Let 245 pass on tmpfs
@ 2019-04-11 13:29   ` Kevin Wolf
  0 siblings, 0 replies; 12+ messages in thread
From: Kevin Wolf @ 2019-04-11 13:29 UTC (permalink / raw)
  To: Max Reitz; +Cc: Alberto Garcia, qemu-devel, qemu-block

Am 10.04.2019 um 18:29 hat Max Reitz geschrieben:
> 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>

Thanks, applied to the block branch.

Kevin


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

end of thread, other threads:[~2019-04-11 13:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-10 16:29 [Qemu-devel] [PATCH] iotests: Let 245 pass on tmpfs Max Reitz
2019-04-10 16:29 ` Max Reitz
2019-04-10 16:39 ` [Qemu-devel] [PATCH for-4.0?] " Eric Blake
2019-04-10 16:39   ` Eric Blake
2019-04-10 16:39   ` Max Reitz
2019-04-10 16:39     ` Max Reitz
2019-04-10 16:55     ` Peter Maydell
2019-04-10 16:55       ` Peter Maydell
2019-04-11 12:44 ` [Qemu-devel] [PATCH] " Alberto Garcia
2019-04-11 12:44   ` Alberto Garcia
2019-04-11 13:29 ` Kevin Wolf
2019-04-11 13:29   ` Kevin Wolf

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.