qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qemu-iotests: Test streaming with missing job ID
@ 2017-05-15 12:39 Kevin Wolf
  2017-05-15 12:46 ` Alberto Garcia
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Kevin Wolf @ 2017-05-15 12:39 UTC (permalink / raw)
  To: qemu-block; +Cc: kwolf, berto, kchamart, qemu-devel

This adds a small test for the image streaming error path for failing
block_job_create(), which would have found the null pointer dereference
in commit a170a91f.

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

diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030
index e00c11b..feee861 100755
--- a/tests/qemu-iotests/030
+++ b/tests/qemu-iotests/030
@@ -147,6 +147,10 @@ class TestSingleDrive(iotests.QMPTestCase):
         result = self.vm.qmp('block-stream', device='nonexistent')
         self.assert_qmp(result, 'error/class', 'GenericError')
 
+    def test_job_id_missing(self):
+        result = self.vm.qmp('block-stream', device='mid')
+        self.assert_qmp(result, 'error/class', 'GenericError')
+
 
 class TestParallelOps(iotests.QMPTestCase):
     num_ops = 4 # Number of parallel block-stream operations
diff --git a/tests/qemu-iotests/030.out b/tests/qemu-iotests/030.out
index 84bfd63..391c857 100644
--- a/tests/qemu-iotests/030.out
+++ b/tests/qemu-iotests/030.out
@@ -1,5 +1,5 @@
-......................
+.......................
 ----------------------------------------------------------------------
-Ran 22 tests
+Ran 23 tests
 
 OK
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-05-17 13:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-15 12:39 [Qemu-devel] [PATCH] qemu-iotests: Test streaming with missing job ID Kevin Wolf
2017-05-15 12:46 ` Alberto Garcia
2017-05-15 13:05   ` Kevin Wolf
2017-05-15 13:20     ` Alberto Garcia
2017-05-17  7:39 ` Kashyap Chamarthy
2017-05-17 12:11 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-05-17 13:26 ` [Qemu-devel] " Jeff Cody

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).