Commit c5158e28 authored by Philippe Gerum's avatar Philippe Gerum Committed by Jan Kiszka
Browse files

testsuite/smokey: net: do not down a previously running test interface

If the test interface is already up on entry, keep it that way on
exit, so that we may run this test multiple times without having to
Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <>
Signed-off-by: Jan Kiszka's avatarJan Kiszka <>
parent 6283a913
......@@ -36,7 +36,7 @@ struct module {
static struct rtnet_core_cmd cmd;
static int fd;
static pthread_t loopback_server_tid;
static bool loopback_thread_created;
static bool loopback_thread_created, ifup;
static struct module modules[] = {
.name = "rtnet",
......@@ -447,6 +447,7 @@ int smokey_net_setup(const char *driver, const char *intf, int tested_config,
err = do_up(intf);
if (err < 0)
goto err;
ifup = true;
smokey_trace("Waiting for interface %s to be running", intf);
......@@ -543,9 +544,11 @@ int smokey_net_teardown(const char *driver, const char *intf, int tested_config)
err = tmp;
tmp = do_down(intf);
if (err == 0)
err = tmp;
if (ifup) {
tmp = do_down(intf);
if (err == 0)
err = tmp;
} else
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment