diff mbox

[qemu-iotests] Update rbd support

Message ID 1302655665-30101-1-git-send-email-josh.durgin@dreamhost.com
State New
Headers show

Commit Message

Josh Durgin April 13, 2011, 12:47 a.m. UTC
rbd is not growable, so test 016 is skipped.

rbd implements bdrv_truncate, so test 025 will work.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
---
 016 |    4 ++++
 025 |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

Comments

Christoph Hellwig April 13, 2011, 2:43 a.m. UTC | #1
> @@ -43,6 +43,10 @@ _supported_fmt raw
>  _supported_proto generic
>  _supported_os Linux
>  
> +# rbd images are not growable
> +if [ "$IMGPROTO" = "rbd" ]; then
> +    _notrun "image protocol $IMGPROTO does not support growable images"
> +fi

I suspect we only support the weird writing past size for the
file protocol, so we should only run the test for it.

Or does sheepdog do anything special about it?
Josh Durgin April 13, 2011, 5:42 a.m. UTC | #2
On Wed, 13 Apr 2011 04:43:39 +0200, Christoph Hellwig <hch@lst.de>
wrote:
>> @@ -43,6 +43,10 @@ _supported_fmt raw
>>  _supported_proto generic
>>  _supported_os Linux
>>
>> +# rbd images are not growable
>> +if [ "$IMGPROTO" = "rbd" ]; then
>> +    _notrun "image protocol $IMGPROTO does not support growable images"
>> +fi
> 
> I suspect we only support the weird writing past size for the
> file protocol, so we should only run the test for it.
> 
> Or does sheepdog do anything special about it?

Sheepdog supports it by truncating to the right size if a write
would be past the end. I'm not sure if other protocols support
it.
Christoph Hellwig April 21, 2011, 6:49 a.m. UTC | #3
On Tue, Apr 12, 2011 at 10:42:00PM -0700, Josh Durgin wrote:
> > I suspect we only support the weird writing past size for the
> > file protocol, so we should only run the test for it.
> > 
> > Or does sheepdog do anything special about it?
> 
> Sheepdog supports it by truncating to the right size if a write
> would be past the end. I'm not sure if other protocols support
> it.

I've changed 016 to require the file or sheepdog protocols, and then
applied the rest of your patch.  Thanks a lot!
diff mbox

Patch

diff --git a/016 b/016
index 16f151f..8fa921f 100755
--- a/016
+++ b/016
@@ -43,6 +43,10 @@  _supported_fmt raw
 _supported_proto generic
 _supported_os Linux
 
+# rbd images are not growable
+if [ "$IMGPROTO" = "rbd" ]; then
+    _notrun "image protocol $IMGPROTO does not support growable images"
+fi
 
 size=128M
 _make_test_img $size
diff --git a/025 b/025
index fba44a4..691b6da 100755
--- a/025
+++ b/025
@@ -40,7 +40,7 @@  trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common.pattern
 
 _supported_fmt raw qcow2
-_supported_proto file sheepdog
+_supported_proto file sheepdog rbd
 _supported_os Linux
 
 echo "=== Creating image"