Ensure that unit tests leave the stack in a clean state

This commit is contained in:
goldsimon
2017-08-03 22:25:33 +02:00
parent 6fa5d02435
commit 4cec20230e
12 changed files with 77 additions and 1 deletions

View File

@@ -58,6 +58,7 @@ tcp_setup(void)
test_tcp_timer = 0;
tcp_remove_all();
lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT));
}
static void
@@ -69,6 +70,7 @@ tcp_teardown(void)
/* restore netif_list for next tests (e.g. loopif) */
netif_list = old_netif_list;
netif_default = old_netif_default;
lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT));
}