mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 06:43:53 -06:00
tests: Add network filter tests to the check-qtest-s390x list
With some small modifications, we can also use the the netfilter, the filter-mirror and the filter-redirector tests on s390x. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Message-Id: <1502951113-4246-3-git-send-email-thuth@redhat.com> Reviewed-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
This commit is contained in:
parent
7f57d58d6a
commit
ea5bef49ea
4 changed files with 36 additions and 9 deletions
|
@ -182,6 +182,12 @@ static void remove_netdev_with_multi_netfilter(void)
|
|||
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);
|
||||
|
@ -191,10 +197,13 @@ int main(int argc, char **argv)
|
|||
qtest_add_func("/netfilter/remove_netdev_multi",
|
||||
remove_netdev_with_multi_netfilter);
|
||||
|
||||
qtest_start("-netdev user,id=qtest-bn0 -device e1000,netdev=qtest-bn0");
|
||||
args = g_strdup_printf("-netdev user,id=qtest-bn0 "
|
||||
"-device %s,netdev=qtest-bn0", devstr);
|
||||
qtest_start(args);
|
||||
ret = g_test_run();
|
||||
|
||||
qtest_end();
|
||||
g_free(args);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue