All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/avocado/hotplug_blk: Fix addr in device_add command
@ 2024-11-22 22:40 Kevin Wolf
  2024-11-23  6:46 ` Markus Armbruster
  2024-11-25  9:35 ` Daniel P. Berrangé
  0 siblings, 2 replies; 3+ messages in thread
From: Kevin Wolf @ 2024-11-22 22:40 UTC (permalink / raw)
  To: qemu-block
  Cc: kwolf, peter.maydell, vsementsov, berrange, stefanha, armbru,
	qemu-devel

pci_devfn properties accept both integer and string values, but
integer 1 and string '1' have different meanings: The integer value
means device 0, function 1 whereas the string value '1' is short for
'1.0' and means device 1, function 0.

This test wants the string version so that the device actually becomes
visible for the guest. device_add hides the problem because it goes
through QemuOpts, which turns all properties into strings - this is a
QEMU bug that we want to fix, but that cancelled out the bug in this
test.

Fix the test first so that device_add can be fixed afterwards.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 tests/avocado/hotplug_blk.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/avocado/hotplug_blk.py b/tests/avocado/hotplug_blk.py
index d55ded1c1d..b36bca02ec 100644
--- a/tests/avocado/hotplug_blk.py
+++ b/tests/avocado/hotplug_blk.py
@@ -33,7 +33,7 @@ def plug(self) -> None:
             'drive': 'disk',
             'id': 'virtio-disk0',
             'bus': 'pci.1',
-            'addr': 1
+            'addr': '1',
         }
 
         self.assert_no_vda()
-- 
2.47.0



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

end of thread, other threads:[~2024-11-25  9:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-22 22:40 [PATCH] tests/avocado/hotplug_blk: Fix addr in device_add command Kevin Wolf
2024-11-23  6:46 ` Markus Armbruster
2024-11-25  9:35 ` Daniel P. Berrangé

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.