Skip to contentSkip to conversation

iotests/118: Drop 'change' test

PATCH Applied Max Reitz 4 participants 6 messages Jan 26, 2021

lore
Share & tools
lore

Max Reitz

author
#0 lore raw

PATCH 1/1 iotests/118: Drop 'change' test

Commit 0afec75734331 removed the 'change' QMP command, so we can no longer test it in 118.

Fixes 0afec75734331a0b52fa3aa4235220eda8c7846f

('qmp: remove deprecated "change" command')

---
 tests/qemu-iotests/118     | 17 -----------------
 tests/qemu-iotests/118.out |  4 ++--
 2 files changed, 2 insertions(+), 19 deletions(-)
tests/qemu-iotests/118 +0 -17
index 1a2e219057..88e8354e21 100755
@@ -74,23 +74,6 @@ class ChangeBaseClass(iotests.QMPTestCase):
 
 class GeneralChangeTestsBaseClass(ChangeBaseClass):
 
-    def test_change(self):
-        # 'change' requires a drive name, so skip the test for blockdev
-        if not self.use_drive:
-            return
-
-        result = self.vm.qmp('change', device='drive0', target=new_img,
-                                       arg=iotests.imgfmt)
-        self.assert_qmp(result, 'return', {})
-
-        self.wait_for_open()
-        self.wait_for_close()
-
-        result = self.vm.qmp('query-block')
-        if self.has_real_tray:
-            self.assert_qmp(result, 'return[0]/tray_open', False)
-        self.assert_qmp(result, 'return[0]/inserted/image/filename', new_img)
-
     def test_blockdev_change_medium(self):
         result = self.vm.qmp('blockdev-change-medium',
                              id=self.device_name, filename=new_img,
tests/qemu-iotests/118.out +2 -2
index bf5bfd5aca..0a70391105 100644
@@ -1,5 +1,5 @@
-.......................................................................................................................................................................
+...........................................................................................................................................................
 ----------------------------------------------------------------------
-Ran 167 tests
+Ran 155 tests
 
 OK
Signature · 1 line
2.29.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Max Reitz

Commit 0afec75734331 removed the 'change' QMP command, so we can no longer test it in 118.

Fixes 0afec75734331a0b52fa3aa4235220eda8c7846f

('qmp: remove deprecated "change" command')

---
 tests/qemu-iotests/118     | 17 -----------------
 tests/qemu-iotests/118.out |  4 ++--
 2 files changed, 2 insertions(+), 19 deletions(-)
Applied
#2 lore raw
In reply to Max Reitz

Am 26.01.2021 um 11:48 hat Max Reitz geschrieben:

Quoted 6 lines

Commit 0afec75734331 removed the 'change' QMP command, so we can no longer test it in 118.

Fixes 0afec75734331a0b52fa3aa4235220eda8c7846f

('qmp: remove deprecated "change" command')

Thanks, applied to the block branch.

(I was just about to make the same change myself...)

If you don't mind, I'd squash in something like the following.

Kevin

tests/qemu-iotests/118 +1 -2
index 88e8354e21..cae52ffa5e 100755
@@ -1,8 +1,7 @@
 #!/usr/bin/env python3
 # group: rw
 #
-# Test case for the QMP 'change' command and all other associated
-# commands
+# Test case for media change monitor commands
 #
 # Copyright (C) 2015 Red Hat, Inc.
 #
author
#3 lore raw
Quoted 21 lines · Kevin Wolf

Am 26.01.2021 um 11:48 hat Max Reitz geschrieben:

Quoted 6 lines

Commit 0afec75734331 removed the 'change' QMP command, so we can no longer test it in 118.

Fixes 0afec75734331a0b52fa3aa4235220eda8c7846f

('qmp: remove deprecated "change" command')

Thanks, applied to the block branch.

(I was just about to make the same change myself...)

If you don't mind, I'd squash in something like the following.

Kevin

tests/qemu-iotests/118 +0 -0
index 88e8354e21..cae52ffa5e 100755

tests/qemu-iotests/118 line 7

Quoted 9 lines
tests/qemu-iotests/118 +1 -2
@@ -1,8 +1,7 @@
  #!/usr/bin/env python3
  # group: rw
  #
-# Test case for the QMP 'change' command and all other associated
-# commands
+# Test case for media change monitor commands
  #
  # Copyright (C) 2015 Red Hat, Inc.
  #

Sure, looks good.

Do you plan on sending a pull request today? I was, and so I’d like to include this patch then.

(Well, I was planning to send it last week, then came the coroutine-sigaltstack stuff, then this, and right now I’m debugging 178 breaking after ccd3b3b8112b670fdccf8a392b8419b173ffccb4...)

Max

#4 lore raw
In reply to Max Reitz
Quoted 10 lines · Max Reitz

Commit 0afec75734331 removed the 'change' QMP command, so we can no longer test it in 118.

Fixes 0afec75734331a0b52fa3aa4235220eda8c7846f

('qmp: remove deprecated "change" command')

---
  tests/qemu-iotests/118     | 17 -----------------
  tests/qemu-iotests/118.out |  4 ++--
  2 files changed, 2 insertions(+), 19 deletions(-)

How come this didn't break GitLab CI?...

Paolo

Quoted 41 lines
tests/qemu-iotests/118 +0 -17
index 1a2e219057..88e8354e21 100755
@@ -74,23 +74,6 @@ class ChangeBaseClass(iotests.QMPTestCase):
 
  class GeneralChangeTestsBaseClass(ChangeBaseClass):
 
-    def test_change(self):
-        # 'change' requires a drive name, so skip the test for blockdev
-        if not self.use_drive:
-            return
-
-        result = self.vm.qmp('change', device='drive0', target=new_img,
-                                       arg=iotests.imgfmt)
-        self.assert_qmp(result, 'return', {})
-
-        self.wait_for_open()
-        self.wait_for_close()
-
-        result = self.vm.qmp('query-block')
-        if self.has_real_tray:
-            self.assert_qmp(result, 'return[0]/tray_open', False)
-        self.assert_qmp(result, 'return[0]/inserted/image/filename', new_img)
-
      def test_blockdev_change_medium(self):
          result = self.vm.qmp('blockdev-change-medium',
                               id=self.device_name, filename=new_img,
tests/qemu-iotests/118.out +2 -2
index bf5bfd5aca..0a70391105 100644
@@ -1,5 +1,5 @@
-.......................................................................................................................................................................
+...........................................................................................................................................................
  ----------------------------------------------------------------------
-Ran 167 tests
+Ran 155 tests
 
  OK
#5 lore raw

Am 26.01.2021 um 12:30 hat Paolo Bonzini geschrieben:

Quoted 12 lines · Max Reitz
Quoted 10 lines

Commit 0afec75734331 removed the 'change' QMP command, so we can no longer test it in 118.

Fixes 0afec75734331a0b52fa3aa4235220eda8c7846f

('qmp: remove deprecated "change" command')

---
  tests/qemu-iotests/118     | 17 -----------------
  tests/qemu-iotests/118.out |  4 ++--
  2 files changed, 2 insertions(+), 19 deletions(-)
Quoted 1 line

How come this didn't break GitLab CI?...

The test case is not in the auto group.

Kevin