From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0tF3-0005rZ-Bo for qemu-devel@nongnu.org; Fri, 05 Jun 2015 11:09:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0tF2-0002LG-Ch for qemu-devel@nongnu.org; Fri, 05 Jun 2015 11:09:05 -0400 Message-ID: <5571BB86.3070605@redhat.com> Date: Fri, 05 Jun 2015 17:08:54 +0200 From: Max Reitz MIME-Version: 1.0 References: <1433360659-1915-1-git-send-email-mreitz@redhat.com> <1433360659-1915-39-git-send-email-mreitz@redhat.com> <556F75D3.9050507@redhat.com> In-Reply-To: <556F75D3.9050507@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 38/38] iotests: Add test for change-related QMP commands List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-block@nongnu.org Cc: Kevin Wolf , John Snow , qemu-devel@nongnu.org, Stefan Hajnoczi , Markus Armbruster On 03.06.2015 23:46, Eric Blake wrote: > On 06/03/2015 01:44 PM, Max Reitz wrote: >> Signed-off-by: Max Reitz >> --- >> 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 As always, thank you! Max