diff mbox series

[5/9] iotests: Fix 237 for Python 2.x

Message ID 20190123144610.8842-6-mreitz@redhat.com
State New
Headers show
Series iotests: Fix some issues | expand

Commit Message

Max Reitz Jan. 23, 2019, 2:46 p.m. UTC
It is not quite clear whether we want to support Python 2.x for any
prolonged time, but this may as well be fixed along with the other
issues some iotests have right now.

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 tests/qemu-iotests/237 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

John Snow Jan. 29, 2019, 9:21 p.m. UTC | #1
On 1/23/19 9:46 AM, Max Reitz wrote:
> It is not quite clear whether we want to support Python 2.x for any
> prolonged time, but this may as well be fixed along with the other
> issues some iotests have right now.
> 

I'd have shuffled this above patch 01 (or immediately below) with a note
in either commit saying that the test is still broken without both patches.

I'd also say what you're actually fixing in the commit
(range wants ints, not floats.)

> Signed-off-by: Max Reitz <mreitz@redhat.com>

But, like, that's just my opinion, man,,

Reviewed-by: John Snow <jsnow@redhat.com>

> ---
>  tests/qemu-iotests/237 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/qemu-iotests/237 b/tests/qemu-iotests/237
> index fe0dd0f461..06897f8c87 100755
> --- a/tests/qemu-iotests/237
> +++ b/tests/qemu-iotests/237
> @@ -224,7 +224,7 @@ with iotests.FilePath('t.vmdk') as disk_path, \
>              iotests.log("= %s %d =" % (subfmt, size))
>              iotests.log("")
>  
> -            num_extents = math.ceil(size / 2.0**31)
> +            num_extents = int(math.ceil(size / 2.0**31))
>              extents = [ "ext%d" % (i) for i in range(1, num_extents + 1) ]
>  
>              vm.launch()
>
Max Reitz Jan. 30, 2019, 1:06 p.m. UTC | #2
On 29.01.19 22:21, John Snow wrote:
> 
> On 1/23/19 9:46 AM, Max Reitz wrote:
>> It is not quite clear whether we want to support Python 2.x for any
>> prolonged time, but this may as well be fixed along with the other
>> issues some iotests have right now.
>>
> 
> I'd have shuffled this above patch 01 (or immediately below) with a note
> in either commit saying that the test is still broken without both patches.

It's only broken for Python 2.x. :-)

I don't have any real order in this series, though, so whatever makes
someone happy makes me happy, too.

> I'd also say what you're actually fixing in the commit
> (range wants ints, not floats.)

Sure, I can add that.

>> Signed-off-by: Max Reitz <mreitz@redhat.com>
> 
> But, like, that's just my opinion, man,,
> 
> Reviewed-by: John Snow <jsnow@redhat.com>

Thanks!

Max
diff mbox series

Patch

diff --git a/tests/qemu-iotests/237 b/tests/qemu-iotests/237
index fe0dd0f461..06897f8c87 100755
--- a/tests/qemu-iotests/237
+++ b/tests/qemu-iotests/237
@@ -224,7 +224,7 @@  with iotests.FilePath('t.vmdk') as disk_path, \
             iotests.log("= %s %d =" % (subfmt, size))
             iotests.log("")
 
-            num_extents = math.ceil(size / 2.0**31)
+            num_extents = int(math.ceil(size / 2.0**31))
             extents = [ "ext%d" % (i) for i in range(1, num_extents + 1) ]
 
             vm.launch()