qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v3 38/38] iotests: Add test for change-related Q


From: Max Reitz
Subject: Re: [Qemu-block] [PATCH v3 38/38] iotests: Add test for change-related QMP commands
Date: Fri, 05 Jun 2015 17:08:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 03.06.2015 23:46, Eric Blake wrote:
On 06/03/2015 01:44 PM, Max Reitz wrote:
Signed-off-by: Max Reitz <address@hidden>
---
  tests/qemu-iotests/118     | 638 +++++++++++++++++++++++++++++++++++++++++++++
  tests/qemu-iotests/118.out |   5 +
  tests/qemu-iotests/group   |   1 +
  3 files changed, 644 insertions(+)
  create mode 100755 tests/qemu-iotests/118
  create mode 100644 tests/qemu-iotests/118.out

+    def test_tray_open_change(self):
+        result = self.vm.qmp('blockdev-open-tray', device='drive0', force=True)
+        self.assert_qmp(result, 'return', {})
+
+        self.wait_for_open()
+
+        result = self.vm.qmp('query-block')
+        self.assert_qmp(result, 'return[0]/tray_open', True)
+        if self.was_empty == True:
Stylistically, isn't 'if self.was_empty:' equivalent?  But I'm no python
guru, so I can live with the test as you have it.

I don't know. :-)

Probably, it's a bit different (in that if self.was_empty was not a boolean), but for this case it would be the same. Assuming it works, that is. I'll just leave it like this to be sure.

+++ b/tests/qemu-iotests/group
@@ -121,6 +121,7 @@
  114 rw auto quick
  115 rw auto
  116 rw auto quick
+118 rw auto
  121 rw auto
Wow - we've got several placeholders pending review :)

Indeed, I still think we do need some kind of list where we can keep track of which test is "taken" by which series...

Reviewed-by: Eric Blake <address@hidden>

As always, thank you!

Max



reply via email to

[Prev in Thread] Current Thread [Next in Thread]