All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, philmd@redhat.com, qemu-devel@nongnu.org,
	armbru@redhat.com, mreitz@redhat.com, jsnow@redhat.com
Subject: [Qemu-devel] [PATCH for-4.1 2/2] iotests/118: Test inserting a read-only medium
Date: Tue, 30 Jul 2019 16:57:27 +0200	[thread overview]
Message-ID: <20190730145727.28965-3-kwolf@redhat.com> (raw)
In-Reply-To: <20190730145727.28965-1-kwolf@redhat.com>

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 tests/qemu-iotests/118     | 6 +++++-
 tests/qemu-iotests/118.out | 4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/tests/qemu-iotests/118 b/tests/qemu-iotests/118
index 603e10e8a2..499c5f0901 100755
--- a/tests/qemu-iotests/118
+++ b/tests/qemu-iotests/118
@@ -207,10 +207,11 @@ class GeneralChangeTestsBaseClass(ChangeBaseClass):
             self.assert_qmp(result, 'return[0]/tray_open', False)
         self.assert_qmp(result, 'return[0]/inserted/image/filename', new_img)
 
-    def test_cycle(self):
+    def test_cycle(self, read_only_node=False):
         result = self.vm.qmp('blockdev-add',
                              node_name='new',
                              driver=iotests.imgfmt,
+                             read_only=read_only_node,
                              file={'filename': new_img,
                                     'driver': 'file'})
         self.assert_qmp(result, 'return', {})
@@ -257,6 +258,9 @@ class GeneralChangeTestsBaseClass(ChangeBaseClass):
             self.assert_qmp(result, 'return[0]/tray_open', False)
         self.assert_qmp(result, 'return[0]/inserted/image/filename', new_img)
 
+    def test_cycle_read_only_media(self):
+        self.test_cycle(True)
+
     def test_close_on_closed(self):
         result = self.vm.qmp('blockdev-close-tray', id=self.device_name)
         # Should be a no-op
diff --git a/tests/qemu-iotests/118.out b/tests/qemu-iotests/118.out
index 6a917130b6..4823c113d5 100644
--- a/tests/qemu-iotests/118.out
+++ b/tests/qemu-iotests/118.out
@@ -1,5 +1,5 @@
-...........................................................
+...............................................................
 ----------------------------------------------------------------------
-Ran 59 tests
+Ran 63 tests
 
 OK
-- 
2.20.1



  parent reply	other threads:[~2019-07-30 15:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 14:57 [Qemu-devel] [PATCH for-4.1 0/2] fdc: Fix inserting read-only media in empty drive Kevin Wolf
2019-07-30 14:57 ` [Qemu-devel] [PATCH for-4.1 1/2] " Kevin Wolf
2019-07-30 15:17   ` Max Reitz
2019-07-30 15:24   ` John Snow
2019-07-30 14:57 ` Kevin Wolf [this message]
2019-07-30 15:24   ` [Qemu-devel] [PATCH for-4.1 2/2] iotests/118: Test inserting a read-only medium Max Reitz
2019-07-30 15:25   ` John Snow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190730145727.28965-3-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.