Skip to contentSkip to conversation

qemu-iotests: make a few more tests generic

PATCH In review Christoph Hellwig 3 participants 10 messages Jul 8, 2009 – Jul 10, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-iotests: make a few more tests generic

Pretend that a non-implemented check is always successful and thus allow various tests that were qcow2-specific before to be generic.

009 +1 -1
Index: qemu-iotests/009
===================================================================
@@ -40,7 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 1
 . ./common.rc
 . ./common.filter
 
-_supported_fmt qcow2
+_supported_fmt generic
 _supported_os Linux
 
 
010 +1 -1
Index: qemu-iotests/010
===================================================================
@@ -40,7 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 1
 . ./common.rc
 . ./common.filter
 
-_supported_fmt qcow2
+_supported_fmt generic
 _supported_os Linux
 
 
011 +1 -1
Index: qemu-iotests/011
===================================================================
@@ -40,7 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 1
 . ./common.rc
 . ./common.filter
 
-_supported_fmt qcow2
+_supported_fmt generic
 _supported_os Linux
 
 
013 +2 -2
Index: qemu-iotests/013
===================================================================
@@ -42,7 +42,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 1
 . ./common.pattern
 
 # much of this could be generic for any format supporting compression.
-_supported_fmt qcow2
+_supported_fmt qcow qcow2
 _supported_os Linux
 
 TEST_OFFSETS="0 4294967296"
@@ -66,7 +66,7 @@ echo "Compressing image"
 echo
 
 mv $TEST_IMG $TEST_IMG.orig
-$QEMU_IMG convert -f qcow2 -O qcow2 -c $TEST_IMG.orig $TEST_IMG
+$QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c $TEST_IMG.orig $TEST_IMG
 
 echo "Testing compressed image"
 echo
014 +1 -1
Index: qemu-iotests/014
===================================================================
@@ -42,7 +42,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 1
 . ./common.filter
 . ./common.pattern
 
-# much of this could be generic for any format supporting compression.
+# much of this could be generic for any format supporting snapshots
 _supported_fmt qcow2
 _supported_os Linux
 
015 +1 -1
Index: qemu-iotests/015
===================================================================
@@ -41,7 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 1
 . ./common.rc
 . ./common.filter
 
-# currently only qcow2 allows for consistency checks using qemu-img
+# actually any format that supports snapshots
 _supported_fmt qcow2
 _supported_os Linux
 
common.rc +2 -1
Index: qemu-iotests/common.rc
===================================================================
@@ -75,7 +75,8 @@ _cleanup_test_img()
 
 _check_test_img()
 {
-    $QEMU_IMG check -f $IMGFMT $TEST_IMG
+    $QEMU_IMG check -f $IMGFMT $TEST_IMG 2>&1 | \
+    	sed -e 's/qemu-img\: This image format does not support checks/No errors were found on the image./'
 }
 
 _get_pids_by_name()
common.pattern +1 -1
Index: qemu-iotests/common.pattern
===================================================================
@@ -96,7 +96,7 @@ function io_test2() {
     io_pattern writev $((offset + 8 * 4096)) 4096 $((9 * 4096)) 256 165
 
     mv $TEST_IMG $TEST_IMG.orig
-    $QEMU_IMG convert -f qcow2 -O qcow2 -c $TEST_IMG.orig $TEST_IMG
+    $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c $TEST_IMG.orig $TEST_IMG
 
     # Write the used clusters
     echo === Used clusters [1]
#1 lore raw
Quoted 2 lines · Christoph Hellwig

Pretend that a non-implemented check is always successful and thus allow various tests that were qcow2-specific before to be generic.

Looks good in general. However, vmdk and vpc fail test case 011 for me. Not sure yet where the problem actually is, there seems to be no qemu-io output at all for these.

Kevin

#2 lore raw
Quoted 7 lines · Kevin Wolf
Quoted 2 lines · Christoph Hellwig

Pretend that a non-implemented check is always successful and thus allow various tests that were qcow2-specific before to be generic.

Looks good in general. However, vmdk and vpc fail test case 011 for me. Not sure yet where the problem actually is, there seems to be no qemu-io output at all for these.

They pass for me. So I guess we have a problem somewhere that we'll eventually need to investigate.

#3 lore raw
Quoted 10 lines · Christoph Hellwig
Quoted 6 lines · Kevin Wolf
Quoted 2 lines · Christoph Hellwig

Pretend that a non-implemented check is always successful and thus allow various tests that were qcow2-specific before to be generic.

Looks good in general. However, vmdk and vpc fail test case 011 for me. Not sure yet where the problem actually is, there seems to be no qemu-io output at all for these.

They pass for me. So I guess we have a problem somewhere that we'll eventually need to investigate.

This problem has already be found. Avi's patch from almost three weeks ago fixes it.

It really starts to get annoying. How am I supposed to work with commits only every other week (which is bad enough) and then patches are forgotten and probably won't be merged before another two weeks? I guess I should manage some local tree with fixes myself and move away from basing my work on git master...

Attaching Avi's patch for reference.

Kevin

Quoted 1 line

From 3458d28d2a1eec3b867f7caa65ba177aa5b77da5 Mon Sep 17 00:00:00 2001

From: Avi Kivity <[email protected]>
Date: Tue, 23 Jun 2009 16:20:36 +0300
Subject: [PATCH] block: Clean up after deleting BHs

Commit 6a7ad299 ("Call qemu_bh_delete at bdrv_aio_bh_cb") deletes emulated aio bottom halves to prevent endless accumulation. However, it leaves a stale ->bh pointer, which is then waited on when the aio is reused.

Zeroing the pointer fixes the issue, allowing vmdk format images to be used.

---
 block.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
block.c +2 -0
index aca5a6d..cefbe77 100644
@@ -1374,6 +1374,7 @@ static void bdrv_aio_cancel_em(BlockDriverAIOCB *blockacb)
 {
     BlockDriverAIOCBSync *acb = (BlockDriverAIOCBSync *)blockacb;
     qemu_bh_delete(acb->bh);
+    acb->bh = NULL;
     qemu_aio_release(acb);
 }
 
@@ -1391,6 +1392,7 @@ static void bdrv_aio_bh_cb(void *opaque)
     qemu_vfree(acb->bounce);
     acb->common.cb(acb->common.opaque, acb->ret);
     qemu_bh_delete(acb->bh);
+    acb->bh = NULL;
     qemu_aio_release(acb);
 }
 
Signature · 1 line
1.6.0.6
#4 lore raw
Quoted 9 lines · Kevin Wolf
Quoted 8 lines · Christoph Hellwig
Quoted 6 lines · Kevin Wolf
Quoted 2 lines · Christoph Hellwig

Pretend that a non-implemented check is always successful and thus allow various tests that were qcow2-specific before to be generic.

Looks good in general. However, vmdk and vpc fail test case 011 for me. Not sure yet where the problem actually is, there seems to be no qemu-io output at all for these.

Quoted 5 lines
Quoted 2 lines

They pass for me. So I guess we have a problem somewhere that we'll eventually need to investigate.

This problem has already be found. Avi's patch from almost three weeks ago fixes it.

Ah, that explains why I don't see it. I kept my local alternative fix around in my quilt stack.

Quoted 5 lines

It really starts to get annoying. How am I supposed to work with commits only every other week (which is bad enough) and then patches are forgotten and probably won't be merged before another two weeks? I guess I should manage some local tree with fixes myself and move away from basing my work on git master...

Yeah, working on qemu has been quite a challenge for me due to this, too. We can try to setup some sort of staging development tree.

#5 lore raw
In reply to Kevin Wolf
Quoted 3 lines · Kevin Wolf

This problem has already be found. Avi's patch from almost three weeks ago fixes it.

Christoph posted an alternative patch and there didn't seem to be a consensus on the thread about what solution was the best one. See http://article.gmane.org/gmane.comp.emulators.qemu/46032/match=block+clean+up+after. It's also up to the submitter to keep track of their patches. If they think one should be applied that hasn't been, they need to follow up on it. The only way to scale here is to push as much work as possible to the outer-most nodes.

Quoted 6 lines

It really starts to get annoying. How am I supposed to work with commits only every other week (which is bad enough) and then patches are forgotten and probably won't be merged before another two weeks? I guess I should manage some local tree with fixes myself and move away from basing my work on git master...

Complaining is all well and good but it doesn't help the problem. Your particular compliant is about a patch that fixes a problem another patch introduced. Greater patch velocity == greater instability because there isn't an adequate amount of testing going on. It takes time to do proper testing and review of patches.

It would be very helpful if you proactively tested/reviewed patches on the mailing list and then commented appropriately. People adding Tested-by tags to patches on the list would be a great help for instance.

Signature · 3 lines
Regards,

Anthony Liguori
#6 lore raw
Quoted 8 lines · Anthony Liguori
Quoted 3 lines · Kevin Wolf

This problem has already be found. Avi's patch from almost three weeks ago fixes it.

Christoph posted an alternative patch and there didn't seem to be a consensus on the thread about what solution was the best one. See
http://article.gmane.org/gmane.comp.emulators.qemu/46032/match=block+clean+up+after.

I know. I really don't care which one is used, but I want to have that bug fixed.

Quoted 4 lines

It's also up to the submitter to keep track of their patches. If they think one should be applied that hasn't been, they need to follow up on it. The only way to scale here is to push as much work as possible to the outer-most nodes.

We can try to help here, but we need to know what you want the process to look like. When do you want us to resend patches? When no patches have been submitted for two weeks, I hesitate to resend a patch that is only a week old. You don't want to be flooded with resends of patches that you have already taken care of or that you have planned to act on later, right?

Quoted 11 lines
Quoted 5 lines

It really starts to get annoying. How am I supposed to work with commits only every other week (which is bad enough) and then patches are forgotten and probably won't be merged before another two weeks? I guess I should manage some local tree with fixes myself and move away from basing my work on git master...

Complaining is all well and good but it doesn't help the problem. Your particular compliant is about a patch that fixes a problem another patch introduced. Greater patch velocity == greater instability because there isn't an adequate amount of testing going on. It takes time to do proper testing and review of patches.

Well, yes and no. If a few patches come into git master each day and a patch breaks something (and the breakage is really annoying), we'll most probably have the fix on the next day. On the other hand, if the patches are two weeks in your queue first, maybe it's a bit less likely that they break things, but if they do the breakage persists until the next big patch round comes two weeks later.

Also with each day of patches not committed we're more and more likely to post patches that apply on master but conflict with your queue.

I would really like to see your queue flushed more often (it has been flushed more frequently in the past, so why did this change in the first place?)

Quoted 3 lines

It would be very helpful if you proactively tested/reviewed patches on the mailing list and then commented appropriately. People adding Tested-by tags to patches on the list would be a great help for instance.

I'm trying to do my share here. If some formalized things like Acked-by or Tested-by tags are more helpful than "Looks good to me" comments, let me know.

Kevin

#7 lore raw
In reply to Anthony Liguori
Quoted 3 lines · Anthony Liguori

Christoph posted an alternative patch and there didn't seem to be a consensus on the thread about what solution was the best one. See
http://article.gmane.org/gmane.comp.emulators.qemu/46032/match=block+clean+up+after.

either one is much much better than nothing.

Quoted 4 lines

It's also up to the submitter to keep track of their patches. If they think one should be applied that hasn't been, they need to follow up on it. The only way to scale here is to push as much work as possible to the outer-most nodes.

It's just really hard to track stuff without feedback. You only flush your queue very sproadicly, so some kind of indicator that it is in the queue would be extremly helpful. Just an ok, I'll queue it to mean that it's not lost means we know it's been deal with in some way, and we can ping patches that haven't gotten any feedback for say a week.

#8 lore raw
Quoted 9 lines · Christoph Hellwig
Quoted 2 lines

It's also up to the submitter to keep track of their patches. If they think one should be applied that hasn't been, they need to follow up on it. The only way to scale here is to push as much work as possible to the outer-most nodes.

It's just really hard to track stuff without feedback. You only flush your queue very sproadicly, so some kind of indicator that it is in the queue would be extremly helpful. Just an ok, I'll queue it to mean that it's not lost means we know it's been deal with in some way, and we can ping patches that haven't gotten any feedback for say a week.

What about akpm-style automated notifications that a patch has been queued and/or rejected from queue? These would just go to the sender, not the list.

It wouldn't be very hard for me to add this.

And yeah, more frequent queue flushing is a separate problem.

Signature · 3 lines
Regards,

Anthony Liguori
#9 lore raw
Quoted 3 lines · Anthony Liguori

What about akpm-style automated notifications that a patch has been queued and/or rejected from queue? These would just go to the sender, not the list.

That would work for me.