aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/test-netfilter.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2021-12-20 11:30:25 +0100
committerThomas Huth <thuth@redhat.com>2021-12-22 08:13:05 +0100
commit31fb263c2963489055789385aa8b91663756edee (patch)
tree42e1bef6717bb33cd54aa59073510394e4337726 /tests/qtest/test-netfilter.c
parent046da5ef5747b8ae8efa02bd1d068abd5d639a12 (diff)
tests/qtest: Make the filter tests independent from a specific NIC
These filter tests need a NIC, no matter which one, so they use a common NIC by default. However, these common NIC models might not always have been compiled into the QEMU target binary, so assuming that a certain NIC is available is a bad idea. Since the exact type of NIC does not really matter for these tests, let's switch to "-nic" instead of "-netdev" so that QEMU can simply pick a default NIC for us. This way we can now run the tests on other targets that have a default machine with an on-board/default NIC, too. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <20211220103025.311759-1-thuth@redhat.com> Reviewed-by: Zhang Chen <chen.zhang@intel.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/qtest/test-netfilter.c')
-rw-r--r--tests/qtest/test-netfilter.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/qtest/test-netfilter.c b/tests/qtest/test-netfilter.c
index 785b6f3226..b09ef7fae9 100644
--- a/tests/qtest/test-netfilter.c
+++ b/tests/qtest/test-netfilter.c
@@ -178,11 +178,6 @@ int main(int argc, char **argv)
{
int ret;
char *args;
- const char *devstr = "e1000";
-
- if (g_str_equal(qtest_get_arch(), "s390x")) {
- devstr = "virtio-net-ccw";
- }
g_test_init(&argc, &argv, NULL);
qtest_add_func("/netfilter/addremove_one", add_one_netfilter);
@@ -192,8 +187,7 @@ int main(int argc, char **argv)
qtest_add_func("/netfilter/remove_netdev_multi",
remove_netdev_with_multi_netfilter);
- args = g_strdup_printf("-netdev user,id=qtest-bn0 "
- "-device %s,netdev=qtest-bn0", devstr);
+ args = g_strdup_printf("-nic user,id=qtest-bn0");
qtest_start(args);
ret = g_test_run();