[PATCH] tests/../test_hotplug_blk: drop unused nic

Vladimir Sementsov-Ogievskiy posted 1 patch 3 weeks, 5 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260629201332.1001055-1-vsementsov@yandex-team.ru
Maintainers: Stefan Hajnoczi <stefanha@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Zhao Liu <zhao1.liu@intel.com>
tests/functional/x86_64/test_hotplug_blk.py | 1 +
1 file changed, 1 insertion(+)
[PATCH] tests/../test_hotplug_blk: drop unused nic
Posted by Vladimir Sementsov-Ogievskiy 3 weeks, 5 days ago
From: Daniil Tatianin <d-tatianin@yandex-team.ru>

The test doesn't need any networking, so drop the net card.
Also the test will break if at some moment q35 aliase refers
to machine type with default virtio-net nic, which will clash with
virtio-blk in the test, and

   self.wait_for_console_pattern('virtio_blk virtio0: [vda]')

will not work.

Let's make the test a bit more resistant to experiments with
machine type.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
 tests/functional/x86_64/test_hotplug_blk.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/functional/x86_64/test_hotplug_blk.py b/tests/functional/x86_64/test_hotplug_blk.py
index 7ddbfefc21..a9b43fe2e9 100755
--- a/tests/functional/x86_64/test_hotplug_blk.py
+++ b/tests/functional/x86_64/test_hotplug_blk.py
@@ -66,6 +66,7 @@ def test(self) -> None:
         self.set_machine('q35')
 
         self.vm.add_args('-accel', 'kvm')
+        self.vm.add_args("-nic", "none")  # avoid creating default nic
         self.vm.add_args('-device', 'pcie-pci-bridge,id=pci.1,bus=pcie.0')
         self.vm.add_args('-m', '1G')
         self.vm.add_args('-append', 'console=ttyS0 rd.rescue')
-- 
2.43.0