iotests: Use // for Python integer division

In Python 3, / is always a floating-point division.  We usually do not
want this, and as Python 2.7 understands // as well, change all integer
divisions to use that.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20181022135307.14398-5-mreitz@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
Max Reitz 2018-10-22 14:53:02 +01:00 committed by Eduardo Habkost
parent 8eb5e6746f
commit 9a3a9a636e
11 changed files with 30 additions and 30 deletions

View file

@ -314,13 +314,13 @@ def test_once(config, qemu_img=False):
image_size = 4 * oneTB
if qemu_img:
iotests.log("# Create image")
qemu_img_create(config, image_size / oneMB)
qemu_img_create(config, image_size // oneMB)
else:
iotests.log("# Create image")
create_image(config, image_size / oneMB)
create_image(config, image_size // oneMB)
lowOffsetMB = 100
highOffsetMB = 3 * oneTB / oneMB
highOffsetMB = 3 * oneTB // oneMB
try:
if not qemu_img: