qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] make check-block/qemu-iotests fixes
@ 2014-09-30 11:27 Kevin Wolf
  2014-09-30 11:27 ` [Qemu-devel] [PATCH 1/2] make check-block: Use default cache modes Kevin Wolf
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Kevin Wolf @ 2014-09-30 11:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, armbru, stefanha

Kevin Wolf (2):
  make check-block: Use default cache modes
  qemu-iotests: Fix supported cache modes for 052

 tests/qemu-iotests-quick.sh | 2 +-
 tests/qemu-iotests/052      | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

-- 
1.8.3.1

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

* [Qemu-devel] [PATCH 1/2] make check-block: Use default cache modes
  2014-09-30 11:27 [Qemu-devel] [PATCH 0/2] make check-block/qemu-iotests fixes Kevin Wolf
@ 2014-09-30 11:27 ` Kevin Wolf
  2014-09-30 11:27 ` [Qemu-devel] [PATCH 2/2] qemu-iotests: Fix supported cache modes for 052 Kevin Wolf
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Kevin Wolf @ 2014-09-30 11:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, armbru, stefanha

When qemu-iotests only gave a choice between cache=none and
cache=writethrough, we picked cache=none because it was the option that
would complete the test in finite time. Some tests could only work for
one of the two options and would be skipped with cache=none, but that
was an acceptable trade-off at the time.

Today, however, qemu-iotests is a bit more flexible than that and you
can specify any of the cache modes supported by qemu. The default is
writeback, like in qemu, which is fast and (unlike cache=none) compatible
with any host filesystem. Test cases that have specific requirements for
the cache mode can also specify a different default.

In order to get a fast test run that works everywhere and doesn't skip
tests that need a different cache mode, not specifying any cache mode
and instead relying on the default is the best we can do today.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 tests/qemu-iotests-quick.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qemu-iotests-quick.sh b/tests/qemu-iotests-quick.sh
index 8a9a4c6..12af731 100755
--- a/tests/qemu-iotests-quick.sh
+++ b/tests/qemu-iotests-quick.sh
@@ -3,6 +3,6 @@
 cd tests/qemu-iotests
 
 ret=0
-./check -T -nocache -qcow2 -g quick || ret=1
+./check -T -qcow2 -g quick || ret=1
 
 exit $ret
-- 
1.8.3.1

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

* [Qemu-devel] [PATCH 2/2] qemu-iotests: Fix supported cache modes for 052
  2014-09-30 11:27 [Qemu-devel] [PATCH 0/2] make check-block/qemu-iotests fixes Kevin Wolf
  2014-09-30 11:27 ` [Qemu-devel] [PATCH 1/2] make check-block: Use default cache modes Kevin Wolf
@ 2014-09-30 11:27 ` Kevin Wolf
  2014-09-30 13:21 ` [Qemu-devel] [PATCH 0/2] make check-block/qemu-iotests fixes Markus Armbruster
  2014-10-02 13:05 ` Stefan Hajnoczi
  3 siblings, 0 replies; 5+ messages in thread
From: Kevin Wolf @ 2014-09-30 11:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, armbru, stefanha

The requirement for this test case is really "no O_DIRECT", because the
temporary snapshot for BDRV_O_SNAPSHOT is created in /tmp, which often
is a tmpfs.

Commit f210a83c ('qemu-iotests: Add _default_cache_mode and
_supported_cache_modes') turned the restriction into writethrough-only,
but that's not really necessary.

Allow to run the test for any non-O_DIRECT cache modes, and use the
global default of writeback if no cache mode is specified.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 tests/qemu-iotests/052 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/qemu-iotests/052 b/tests/qemu-iotests/052
index 6bdae92..61959e2 100755
--- a/tests/qemu-iotests/052
+++ b/tests/qemu-iotests/052
@@ -41,8 +41,9 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _supported_fmt generic
 _supported_proto file
 _supported_os Linux
-_default_cache_mode "writethrough"
-_supported_cache_modes "writethrough"
+
+# Don't do O_DIRECT on tmpfs
+_supported_cache_modes "writeback" "writethrough" "unsafe"
 
 size=128M
 _make_test_img $size
-- 
1.8.3.1

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

* Re: [Qemu-devel] [PATCH 0/2] make check-block/qemu-iotests fixes
  2014-09-30 11:27 [Qemu-devel] [PATCH 0/2] make check-block/qemu-iotests fixes Kevin Wolf
  2014-09-30 11:27 ` [Qemu-devel] [PATCH 1/2] make check-block: Use default cache modes Kevin Wolf
  2014-09-30 11:27 ` [Qemu-devel] [PATCH 2/2] qemu-iotests: Fix supported cache modes for 052 Kevin Wolf
@ 2014-09-30 13:21 ` Markus Armbruster
  2014-10-02 13:05 ` Stefan Hajnoczi
  3 siblings, 0 replies; 5+ messages in thread
From: Markus Armbruster @ 2014-09-30 13:21 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-devel, stefanha

I'll rebase my block-backend branch onto this for more complete testing.

Series
Reviewed-by: Markus Armbruster <armbru@redhat.com>

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

* Re: [Qemu-devel] [PATCH 0/2] make check-block/qemu-iotests fixes
  2014-09-30 11:27 [Qemu-devel] [PATCH 0/2] make check-block/qemu-iotests fixes Kevin Wolf
                   ` (2 preceding siblings ...)
  2014-09-30 13:21 ` [Qemu-devel] [PATCH 0/2] make check-block/qemu-iotests fixes Markus Armbruster
@ 2014-10-02 13:05 ` Stefan Hajnoczi
  3 siblings, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2014-10-02 13:05 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-devel, stefanha, armbru

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

On Tue, Sep 30, 2014 at 01:27:08PM +0200, Kevin Wolf wrote:
> Kevin Wolf (2):
>   make check-block: Use default cache modes
>   qemu-iotests: Fix supported cache modes for 052
> 
>  tests/qemu-iotests-quick.sh | 2 +-
>  tests/qemu-iotests/052      | 5 +++--
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> -- 
> 1.8.3.1
> 
> 

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

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

end of thread, other threads:[~2014-10-02 13:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-30 11:27 [Qemu-devel] [PATCH 0/2] make check-block/qemu-iotests fixes Kevin Wolf
2014-09-30 11:27 ` [Qemu-devel] [PATCH 1/2] make check-block: Use default cache modes Kevin Wolf
2014-09-30 11:27 ` [Qemu-devel] [PATCH 2/2] qemu-iotests: Fix supported cache modes for 052 Kevin Wolf
2014-09-30 13:21 ` [Qemu-devel] [PATCH 0/2] make check-block/qemu-iotests fixes Markus Armbruster
2014-10-02 13:05 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).