[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/9] iotests: use octal numbers for python3 comp
From: |
Daniel P. Berrange |
Subject: |
Re: [Qemu-devel] [PATCH 4/9] iotests: use octal numbers for python3 compatibility |
Date: |
Wed, 20 Dec 2017 10:05:43 +0000 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
On Tue, Dec 19, 2017 at 02:34:20PM -0300, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> tests/qemu-iotests/118 | 24 ++++++++++++------------
> 1 file changed, 12 insertions(+), 12 deletions(-)
Reviewed-by: Daniel P. Berrange <address@hidden>
>
> diff --git a/tests/qemu-iotests/118 b/tests/qemu-iotests/118
> index 8a9e838c90..3cf21218f0 100755
> --- a/tests/qemu-iotests/118
> +++ b/tests/qemu-iotests/118
> @@ -417,14 +417,14 @@ class TestChangeReadOnly(ChangeBaseClass):
>
> def tearDown(self):
> self.vm.shutdown()
> - os.chmod(old_img, 0666)
> - os.chmod(new_img, 0666)
> + os.chmod(old_img, 0o666)
> + os.chmod(new_img, 0o666)
> os.remove(old_img)
> os.remove(new_img)
>
> def test_ro_ro_retain(self):
> - os.chmod(old_img, 0444)
> - os.chmod(new_img, 0444)
> + os.chmod(old_img, 0o444)
> + os.chmod(new_img, 0o444)
> self.vm.add_drive(old_img, 'media=disk,read-only=on', 'floppy')
> self.vm.launch()
>
> @@ -443,7 +443,7 @@ class TestChangeReadOnly(ChangeBaseClass):
> self.assert_qmp(result, 'return[0]/inserted/image/filename', new_img)
>
> def test_ro_rw_retain(self):
> - os.chmod(old_img, 0444)
> + os.chmod(old_img, 0o444)
> self.vm.add_drive(old_img, 'media=disk,read-only=on', 'floppy')
> self.vm.launch()
>
> @@ -462,7 +462,7 @@ class TestChangeReadOnly(ChangeBaseClass):
> self.assert_qmp(result, 'return[0]/inserted/image/filename', new_img)
>
> def test_rw_ro_retain(self):
> - os.chmod(new_img, 0444)
> + os.chmod(new_img, 0o444)
> self.vm.add_drive(old_img, 'media=disk', 'floppy')
> self.vm.launch()
>
> @@ -483,7 +483,7 @@ class TestChangeReadOnly(ChangeBaseClass):
> self.assert_qmp(result, 'return[0]/inserted/image/filename', old_img)
>
> def test_ro_rw(self):
> - os.chmod(old_img, 0444)
> + os.chmod(old_img, 0o444)
> self.vm.add_drive(old_img, 'media=disk,read-only=on', 'floppy')
> self.vm.launch()
>
> @@ -503,7 +503,7 @@ class TestChangeReadOnly(ChangeBaseClass):
> self.assert_qmp(result, 'return[0]/inserted/image/filename', new_img)
>
> def test_rw_ro(self):
> - os.chmod(new_img, 0444)
> + os.chmod(new_img, 0o444)
> self.vm.add_drive(old_img, 'media=disk', 'floppy')
> self.vm.launch()
>
> @@ -542,7 +542,7 @@ class TestChangeReadOnly(ChangeBaseClass):
> self.assert_qmp(result, 'return[0]/inserted/image/filename', new_img)
>
> def test_make_ro_rw(self):
> - os.chmod(new_img, 0444)
> + os.chmod(new_img, 0o444)
> self.vm.add_drive(old_img, 'media=disk', 'floppy')
> self.vm.launch()
>
> @@ -562,7 +562,7 @@ class TestChangeReadOnly(ChangeBaseClass):
> self.assert_qmp(result, 'return[0]/inserted/image/filename', old_img)
>
> def test_make_rw_ro_by_retain(self):
> - os.chmod(old_img, 0444)
> + os.chmod(old_img, 0o444)
> self.vm.add_drive(old_img, 'media=disk,read-only=on', 'floppy')
> self.vm.launch()
>
> @@ -581,7 +581,7 @@ class TestChangeReadOnly(ChangeBaseClass):
> self.assert_qmp(result, 'return[0]/inserted/image/filename', new_img)
>
> def test_make_ro_rw_by_retain(self):
> - os.chmod(new_img, 0444)
> + os.chmod(new_img, 0o444)
> self.vm.add_drive(old_img, 'media=disk', 'floppy')
> self.vm.launch()
>
> @@ -600,7 +600,7 @@ class TestChangeReadOnly(ChangeBaseClass):
> self.assert_qmp(result, 'return[0]/inserted/image/filename', old_img)
>
> def test_rw_ro_cycle(self):
> - os.chmod(new_img, 0444)
> + os.chmod(new_img, 0o444)
> self.vm.add_drive(old_img, 'media=disk', 'floppy')
> self.vm.launch()
>
> --
> 2.15.1
>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
- [Qemu-devel] [PATCH 0/9] iotests: python3 compatibility, Philippe Mathieu-Daudé, 2017/12/19
- [Qemu-devel] [PATCH 1/9] qemu.py: replace iteritems() by items() for python3 compatibility, Philippe Mathieu-Daudé, 2017/12/19
- [Qemu-devel] [PATCH 2/9] qmp.py: encode JSON unicode as byte strings for python3 compatibility, Philippe Mathieu-Daudé, 2017/12/19
- [Qemu-devel] [PATCH 3/9] iotests: replace print statement by print() function for python3 compatibility, Philippe Mathieu-Daudé, 2017/12/19
- [Qemu-devel] [PATCH 4/9] iotests: use octal numbers for python3 compatibility, Philippe Mathieu-Daudé, 2017/12/19
- Re: [Qemu-devel] [PATCH 4/9] iotests: use octal numbers for python3 compatibility,
Daniel P. Berrange <=
- [Qemu-devel] [PATCH 5/9] iotests: replace xrange() by range() for python3 compatibility, Philippe Mathieu-Daudé, 2017/12/19
- [Qemu-devel] [PATCH 6/9] iotests: replace dict.has_key() by 'in' operator for python3 compatibility, Philippe Mathieu-Daudé, 2017/12/19
- [Qemu-devel] [PATCH 7/9] iotests: replace lambda function by lambda expression for python3 compatibility, Philippe Mathieu-Daudé, 2017/12/19
- [Qemu-devel] [PATCH 8/9] iotests: replace assertEquals() by assertEqual() for python3 compatibility, Philippe Mathieu-Daudé, 2017/12/19
- [Qemu-devel] [PATCH 9/9] iotests.py: use io.StringIO with python3, Philippe Mathieu-Daudé, 2017/12/19