Skip to contentSkip to conversation

qemu-iotests/stream-under-throttle: do not shutdown QEMU

PATCH Applied Christian Borntraeger 3 participants 6 messages Dec 7, 2022 – Jan 10, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-iotests/stream-under-throttle: do not shutdown QEMU

Without a kernel or boot disk a QEMU on s390 will exit (usually with a disabled wait state). This breaks the stream-under-throttle test case. Do not exit qemu if on s390.

---
 tests/qemu-iotests/tests/stream-under-throttle | 2 ++
 1 file changed, 2 insertions(+)
tests/qemu-iotests/tests/stream-under-throttle +2 -0
index 8d2d9e16840d..c24dfbcaa2f2 100755
@@ -88,6 +88,8 @@ class TestStreamWithThrottle(iotests.QMPTestCase):
                            'x-iops-total=10000,x-bps-total=104857600')
         self.vm.add_blockdev(self.vm.qmp_to_opts(blockdev))
         self.vm.add_device('virtio-blk,iothread=iothr0,drive=throttled-node')
+        if iotests.qemu_default_machine == 's390-ccw-virtio':
+            self.vm.add_args('-no-shutdown')
         self.vm.launch()
 
     def tearDown(self) -> None:
Signature · 1 line
2.38.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Christian Borntraeger

Without a kernel or boot disk a QEMU on s390 will exit (usually with a disabled wait state). This breaks the stream-under-throttle test case. Do not exit qemu if on s390.

---
  tests/qemu-iotests/tests/stream-under-throttle | 2 ++
  1 file changed, 2 insertions(+)
tests/qemu-iotests/tests/stream-under-throttle +0 -0
index 8d2d9e16840d..c24dfbcaa2f2 100755

tests/qemu-iotests/tests/stream-under-throttle class TestStreamWithThrottle(iotests.QMPTestCase): · line 93

Quoted 6 lines
tests/qemu-iotests/tests/stream-under-throttle +2 -0
@@ -88,6 +88,8 @@ class TestStreamWithThrottle(iotests.QMPTestCase):
                             'x-iops-total=10000,x-bps-total=104857600')
          self.vm.add_blockdev(self.vm.qmp_to_opts(blockdev))
          self.vm.add_device('virtio-blk,iothread=iothr0,drive=throttled-node')
+        if iotests.qemu_default_machine == 's390-ccw-virtio':
+            self.vm.add_args('-no-shutdown')
          self.vm.launch()

I guess you could even add that unconditionally for all architectures?

Anyway:

#2 lore raw

Am 07.12.22 um 14:23 schrieb Thomas Huth:

Quoted 10 lines · Christian Borntraeger
Quoted 9 lines

Without a kernel or boot disk a QEMU on s390 will exit (usually with a disabled wait state). This breaks the stream-under-throttle test case. Do not exit qemu if on s390.

---
  tests/qemu-iotests/tests/stream-under-throttle | 2 ++

  1 file changed, 2 insertions(+)
Quoted 13 lines

tests/qemu-iotests/tests/stream-under-throttle class TestStreamWithThrottle(iotests.QMPTestCase): · line 93

Quoted 11 lines
tests/qemu-iotests/tests/stream-under-throttle +2 -0
index 8d2d9e16840d..c24dfbcaa2f2 100755
@@ -88,6 +88,8 @@ class TestStreamWithThrottle(iotests.QMPTestCase):
                              'x-iops-total=10000,x-bps-total=104857600')
           self.vm.add_blockdev(self.vm.qmp_to_opts(blockdev))
           self.vm.add_device('virtio-blk,iothread=iothr0,drive=throttled-node')
+        if iotests.qemu_default_machine == 's390-ccw-virtio':
+            self.vm.add_args('-no-shutdown')
           self.vm.launch()

I guess you could even add that unconditionally for all architectures?

maybe. It might even fix other architecture with the same problem. But I dont know if thats the case. So we can start with this fix and then remove the if at a later point in time if necessary/useful.

Quoted 3 lines

Anyway:

#3 lore raw
In reply to Christian Borntraeger

Am 07.12.22 um 14:14 schrieb Christian Borntraeger:

Quoted 14 lines

Without a kernel or boot disk a QEMU on s390 will exit (usually with a disabled wait state). This breaks the stream-under-throttle test case. Do not exit qemu if on s390.

---
  tests/qemu-iotests/tests/stream-under-throttle | 2 ++
  1 file changed, 2 insertions(+)
tests/qemu-iotests/tests/stream-under-throttle +0 -0
index 8d2d9e16840d..c24dfbcaa2f2 100755

tests/qemu-iotests/tests/stream-under-throttle class TestStreamWithThrottle(iotests.QMPTestCase): · line 95

Quoted 8 lines
tests/qemu-iotests/tests/stream-under-throttle +2 -0
@@ -88,6 +88,8 @@ class TestStreamWithThrottle(iotests.QMPTestCase):
                             'x-iops-total=10000,x-bps-total=104857600')
          self.vm.add_blockdev(self.vm.qmp_to_opts(blockdev))
          self.vm.add_device('virtio-blk,iothread=iothr0,drive=throttled-node')
+        if iotests.qemu_default_machine == 's390-ccw-virtio':
+            self.vm.add_args('-no-shutdown')
          self.vm.launch()
 
      def tearDown(self) -> None:

ping. I guess, this will come after the release?

#4 lore raw
Quoted 20 lines · Christian Borntraeger

Am 07.12.22 um 14:14 schrieb Christian Borntraeger:

Quoted 17 lines

Without a kernel or boot disk a QEMU on s390 will exit (usually with a disabled wait state). This breaks the stream-under-throttle test case. Do not exit qemu if on s390.

---
  tests/qemu-iotests/tests/stream-under-throttle | 2 ++

  1 file changed, 2 insertions(+)
tests/qemu-iotests/tests/stream-under-throttle +0 -0
index 8d2d9e16840d..c24dfbcaa2f2 100755
@@ -88,6 +88,8 @@ class TestStreamWithThrottle(iotests.QMPTestCase):
                              'x-iops-total=10000,x-bps-total=104857600')
           self.vm.add_blockdev(self.vm.qmp_to_opts(blockdev))
 
Quoted 8 lines
Quoted 5 lines
tests/qemu-iotests/tests/stream-under-throttle +2 -0
 self.vm.add_device('virtio-blk,iothread=iothr0,drive=throttled-node')
+        if iotests.qemu_default_machine == 's390-ccw-virtio':
+            self.vm.add_args('-no-shutdown')
           self.vm.launch()

      def tearDown(self) -> None:

ping. I guess, this will come after the release?

Since it is related to s390x, I can take it through my s390x branch.

Thomas