* [Qemu-devel] [PATCH][qemu-iotests] Improve test for qemu-img convert with backing file
@ 2010-10-14 13:01 Kevin Wolf
2010-10-15 14:57 ` [Qemu-devel] " Christoph Hellwig
0 siblings, 1 reply; 6+ messages in thread
From: Kevin Wolf @ 2010-10-14 13:01 UTC (permalink / raw)
To: hch; +Cc: kwolf, qemu-devel
Additionally to testing the qemu-img convert -B option, also test
-o backing_file.
Also, the old test acidentlly used a pattern of zeros for most of the writes,
so that the allocation test didn't really work out. This is fixed by using an
explicit pattern.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
019 | 59 ++++++++++++++++++++++++++++++++++++-----------------------
1 files changed, 36 insertions(+), 23 deletions(-)
diff --git a/019 b/019
index 711255e..896b8d9 100755
--- a/019
+++ b/019
@@ -57,10 +57,10 @@ echo
for offset in $TEST_OFFSETS; do
# Some clusters with alternating backing file/image file reads
- io writev $(( offset )) 512 1024 64
+ io_pattern writev $(( offset )) 512 1024 64 42
# Complete backing clusters
- io writev $(( offset + 1024 * 1024)) $CLUSTER_SIZE $CLUSTER_SIZE 1
+ io_pattern writev $(( offset + 1024 * 1024)) $CLUSTER_SIZE $CLUSTER_SIZE 1 42
done
_check_test_img
@@ -75,39 +75,52 @@ echo
for offset in $TEST_OFFSETS; do
# Some clusters with alternating backing file/image file reads
- io writev $(( offset + 512 )) 512 1024 64
+ io_pattern writev $(( offset + 512 )) 512 1024 64 43
# Complete test image clusters
- io writev $(( offset + 1024 * 1024 + $CLUSTER_SIZE)) $CLUSTER_SIZE $CLUSTER_SIZE 1
+ io_pattern writev $(( offset + 1024 * 1024 + $CLUSTER_SIZE)) $CLUSTER_SIZE $CLUSTER_SIZE 1 43
done
_check_test_img
mv $TEST_IMG $TEST_IMG.orig
-$QEMU_IMG convert -O $IMGFMT -B $TEST_IMG.base $TEST_IMG.orig $TEST_IMG
-echo "Checking if backing clusters are allocated when they shouldn't"
-echo
-for offset in $TEST_OFFSETS; do
- # Complete backing clusters
- is_allocated $(( offset + 1024 * 1024)) $CLUSTER_SIZE $CLUSTER_SIZE 1
-done
-echo "Reading"
-echo
-for offset in $TEST_OFFSETS; do
- # Some clusters with alternating backing file/image file reads
- io readv $(( offset )) 512 1024 64
- io readv $(( offset + 512 )) 512 1024 64
+# Test the conversion twice: One test with the old-style -B option and another
+# one with -o backing_file
- # Complete test image clusters
- io readv $(( offset + 1024 * 1024)) $CLUSTER_SIZE $CLUSTER_SIZE 1
- io readv $(( offset + 1024 * 1024 + $CLUSTER_SIZE)) $CLUSTER_SIZE $CLUSTER_SIZE 1
+for backing_option in "-B $TEST_IMG.base" "-o backing_file=$TEST_IMG.base"; do
+
+ echo
+ echo Testing conversion with $backing_option
+ echo
+ $QEMU_IMG convert -O $IMGFMT $backing_option $TEST_IMG.orig $TEST_IMG
+
+ echo "Checking if backing clusters are allocated when they shouldn't"
+ echo
+ for offset in $TEST_OFFSETS; do
+ # Complete backing clusters
+ is_allocated $(( offset + 1024 * 1024)) $CLUSTER_SIZE $CLUSTER_SIZE 1
+ done
+
+ echo "Reading"
+ echo
+
+ for offset in $TEST_OFFSETS; do
+ # Some clusters with alternating backing file/image file reads
+ io_pattern readv $(( offset )) 512 1024 64 42
+ io_pattern readv $(( offset + 512 )) 512 1024 64 43
+
+ # Complete test image clusters
+ io_pattern readv $(( offset + 1024 * 1024)) $CLUSTER_SIZE $CLUSTER_SIZE 1 42
+ io_pattern readv $(( offset + 1024 * 1024 + $CLUSTER_SIZE)) $CLUSTER_SIZE $CLUSTER_SIZE 1 43
+
+ # Empty sectors
+ io_zero readv $(( offset + 1024 * 1024 + $CLUSTER_SIZE * 4 )) $CLUSTER_SIZE $CLUSTER_SIZE 1
+ done
+ _check_test_img
- # Empty sectors
- io_zero readv $(( offset + 1024 * 1024 + $CLUSTER_SIZE * 4 )) $CLUSTER_SIZE $CLUSTER_SIZE 1
done
-_check_test_img
# success, all done
echo "*** done"
--
1.7.2.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] Re: [PATCH][qemu-iotests] Improve test for qemu-img convert with backing file
2010-10-14 13:01 [Qemu-devel] [PATCH][qemu-iotests] Improve test for qemu-img convert with backing file Kevin Wolf
@ 2010-10-15 14:57 ` Christoph Hellwig
2010-10-15 15:56 ` Kevin Wolf
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2010-10-15 14:57 UTC (permalink / raw)
To: Kevin Wolf; +Cc: hch, qemu-devel
On Thu, Oct 14, 2010 at 03:01:18PM +0200, Kevin Wolf wrote:
> Additionally to testing the qemu-img convert -B option, also test
> -o backing_file.
>
> Also, the old test acidentlly used a pattern of zeros for most of the writes,
> so that the allocation test didn't really work out. This is fixed by using an
> explicit pattern.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> 019 | 59 ++++++++++++++++++++++++++++++++++++-----------------------
> 1 files changed, 36 insertions(+), 23 deletions(-)
It's missing the update to the golden output an now fails.
Btw, did you change the qemu-img check to tell people that leaked
clusters are harmless? That message causes 026 to fail for me with a
recent qemu-img.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] Re: [PATCH][qemu-iotests] Improve test for qemu-img convert with backing file
2010-10-15 14:57 ` [Qemu-devel] " Christoph Hellwig
@ 2010-10-15 15:56 ` Kevin Wolf
2010-10-15 16:06 ` Christoph Hellwig
0 siblings, 1 reply; 6+ messages in thread
From: Kevin Wolf @ 2010-10-15 15:56 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: qemu-devel
Am 15.10.2010 16:57, schrieb Christoph Hellwig:
> On Thu, Oct 14, 2010 at 03:01:18PM +0200, Kevin Wolf wrote:
>> Additionally to testing the qemu-img convert -B option, also test
>> -o backing_file.
>>
>> Also, the old test acidentlly used a pattern of zeros for most of the writes,
>> so that the allocation test didn't really work out. This is fixed by using an
>> explicit pattern.
>>
>> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
>> ---
>> 019 | 59 ++++++++++++++++++++++++++++++++++++-----------------------
>> 1 files changed, 36 insertions(+), 23 deletions(-)
>
> It's missing the update to the golden output an now fails.
Oops... Will send a new version.
> Btw, did you change the qemu-img check to tell people that leaked
> clusters are harmless? That message causes 026 to fail for me with a
> recent qemu-img.
Didn't I send a patch for qemu-iotests, too? I do have local commit
updating this at least.
Kevin
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] Re: [PATCH][qemu-iotests] Improve test for qemu-img convert with backing file
2010-10-15 15:56 ` Kevin Wolf
@ 2010-10-15 16:06 ` Christoph Hellwig
2010-10-15 16:11 ` [Qemu-devel] [PATCH] qemu-iotests: Update expected results after qemu-img changes Kevin Wolf
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2010-10-15 16:06 UTC (permalink / raw)
To: Kevin Wolf; +Cc: Christoph Hellwig, qemu-devel
On Fri, Oct 15, 2010 at 05:56:03PM +0200, Kevin Wolf wrote:
> Didn't I send a patch for qemu-iotests, too? I do have local commit
> updating this at least.
If you have it around please just resend it.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH] qemu-iotests: Update expected results after qemu-img changes
2010-10-15 16:06 ` Christoph Hellwig
@ 2010-10-15 16:11 ` Kevin Wolf
2010-10-15 21:12 ` [Qemu-devel] " Christoph Hellwig
0 siblings, 1 reply; 6+ messages in thread
From: Kevin Wolf @ 2010-10-15 16:11 UTC (permalink / raw)
To: hch; +Cc: kwolf, qemu-devel
The error message for leaked clusters has changed. qemu-iotests needs to be
updated to pass 026 again.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
026.out | 120 +++++++++++++++++++++++++++++++++++++++++++++++----------------
1 files changed, 90 insertions(+), 30 deletions(-)
diff --git a/026.out b/026.out
index da611e5..b503cf2 100644
--- a/026.out
+++ b/026.out
@@ -5,42 +5,58 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l1_update; errno: 5; imm: off; once: on; write
write failed: Input/output error
-1 errors were found on the image.
+
+1 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l1_update; errno: 5; imm: off; once: on; write -b
write failed: Input/output error
-1 errors were found on the image.
+
+1 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l1_update; errno: 5; imm: off; once: off; write
write failed: Input/output error
-1 errors were found on the image.
+
+1 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l1_update; errno: 5; imm: off; once: off; write -b
write failed: Input/output error
-1 errors were found on the image.
+
+1 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l1_update; errno: 28; imm: off; once: on; write
write failed: No space left on device
-1 errors were found on the image.
+
+1 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l1_update; errno: 28; imm: off; once: on; write -b
write failed: No space left on device
-1 errors were found on the image.
+
+1 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l1_update; errno: 28; imm: off; once: off; write
write failed: No space left on device
-1 errors were found on the image.
+
+1 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l1_update; errno: 28; imm: off; once: off; write -b
write failed: No space left on device
-1 errors were found on the image.
+
+1 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l2_load; errno: 5; imm: off; once: on; write
@@ -109,42 +125,58 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l2_update; errno: 5; imm: off; once: on; write
write failed: Input/output error
-128 errors were found on the image.
+
+128 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l2_update; errno: 5; imm: off; once: on; write -b
write failed: Input/output error
-128 errors were found on the image.
+
+128 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l2_update; errno: 5; imm: off; once: off; write
write failed: Input/output error
-128 errors were found on the image.
+
+128 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l2_update; errno: 5; imm: off; once: off; write -b
write failed: Input/output error
-128 errors were found on the image.
+
+128 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l2_update; errno: 28; imm: off; once: on; write
write failed: No space left on device
-128 errors were found on the image.
+
+128 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l2_update; errno: 28; imm: off; once: on; write -b
write failed: No space left on device
-128 errors were found on the image.
+
+128 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l2_update; errno: 28; imm: off; once: off; write
write failed: No space left on device
-128 errors were found on the image.
+
+128 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l2_update; errno: 28; imm: off; once: off; write -b
write failed: No space left on device
-128 errors were found on the image.
+
+128 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l2_alloc.write; errno: 5; imm: off; once: on; write
@@ -154,7 +186,9 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l2_alloc.write; errno: 5; imm: off; once: on; write -b
write failed: Input/output error
-1 errors were found on the image.
+
+1 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l2_alloc.write; errno: 5; imm: off; once: off; write
@@ -164,7 +198,9 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l2_alloc.write; errno: 5; imm: off; once: off; write -b
write failed: Input/output error
-1 errors were found on the image.
+
+1 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l2_alloc.write; errno: 28; imm: off; once: on; write
@@ -174,7 +210,9 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l2_alloc.write; errno: 28; imm: off; once: on; write -b
write failed: No space left on device
-1 errors were found on the image.
+
+1 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l2_alloc.write; errno: 28; imm: off; once: off; write
@@ -184,7 +222,9 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l2_alloc.write; errno: 28; imm: off; once: off; write -b
write failed: No space left on device
-1 errors were found on the image.
+
+1 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: write_aio; errno: 5; imm: off; once: on; write
@@ -402,12 +442,16 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=512
Event: refblock_alloc.hookup; errno: 28; imm: off; once: off; write
write failed: No space left on device
-55 errors were found on the image.
+
+55 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=512
Event: refblock_alloc.hookup; errno: 28; imm: off; once: off; write -b
write failed: No space left on device
-251 errors were found on the image.
+
+251 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=512
Event: refblock_alloc.write; errno: 28; imm: off; once: on; write
@@ -442,12 +486,16 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=512
Event: refblock_alloc.write_blocks; errno: 28; imm: off; once: off; write
write failed: No space left on device
-10 errors were found on the image.
+
+10 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=512
Event: refblock_alloc.write_blocks; errno: 28; imm: off; once: off; write -b
write failed: No space left on device
-23 errors were found on the image.
+
+23 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=512
Event: refblock_alloc.write_table; errno: 28; imm: off; once: on; write
@@ -462,12 +510,16 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=512
Event: refblock_alloc.write_table; errno: 28; imm: off; once: off; write
write failed: No space left on device
-10 errors were found on the image.
+
+10 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=512
Event: refblock_alloc.write_table; errno: 28; imm: off; once: off; write -b
write failed: No space left on device
-23 errors were found on the image.
+
+23 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=512
Event: refblock_alloc.switch_table; errno: 28; imm: off; once: on; write
@@ -482,12 +534,16 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=512
Event: refblock_alloc.switch_table; errno: 28; imm: off; once: off; write
write failed: No space left on device
-10 errors were found on the image.
+
+10 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=512
Event: refblock_alloc.switch_table; errno: 28; imm: off; once: off; write -b
write failed: No space left on device
-23 errors were found on the image.
+
+23 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
=== L1 growth tests ===
@@ -543,7 +599,9 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l1_grow.activate_table; errno: 5; imm: off; once: off
qcow2_free_clusters failed: Input/output error
write failed: Input/output error
-96 errors were found on the image.
+
+96 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l1_grow.activate_table; errno: 28; imm: off; once: on
@@ -554,5 +612,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 cluster_size=1024
Event: l1_grow.activate_table; errno: 28; imm: off; once: off
qcow2_free_clusters failed: No space left on device
write failed: No space left on device
-96 errors were found on the image.
+
+96 leaked clusters were found on the image.
+This means waste of disk space, but no harm to data.
*** done
--
1.7.2.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] Re: [PATCH] qemu-iotests: Update expected results after qemu-img changes
2010-10-15 16:11 ` [Qemu-devel] [PATCH] qemu-iotests: Update expected results after qemu-img changes Kevin Wolf
@ 2010-10-15 21:12 ` Christoph Hellwig
0 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2010-10-15 21:12 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-devel
On Fri, Oct 15, 2010 at 06:11:50PM +0200, Kevin Wolf wrote:
> The error message for leaked clusters has changed. qemu-iotests needs to be
> updated to pass 026 again.
Thanks, applied!
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-10-15 21:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-14 13:01 [Qemu-devel] [PATCH][qemu-iotests] Improve test for qemu-img convert with backing file Kevin Wolf
2010-10-15 14:57 ` [Qemu-devel] " Christoph Hellwig
2010-10-15 15:56 ` Kevin Wolf
2010-10-15 16:06 ` Christoph Hellwig
2010-10-15 16:11 ` [Qemu-devel] [PATCH] qemu-iotests: Update expected results after qemu-img changes Kevin Wolf
2010-10-15 21:12 ` [Qemu-devel] " Christoph Hellwig
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.