On 03.06.2015 23:46, Eric Blake wrote:
On 06/03/2015 01:44 PM, Max Reitz wrote:
Signed-off-by: Max Reitz <mre...@redhat.com>
---
  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 <ebl...@redhat.com>

As always, thank you!

Max

Reply via email to