static void udp_teardown(void) { udp_remove_all(); default_netif_remove(); lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); }
static void udp_setup(void) { udp_remove_all(); default_netif_add(); lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); }
static void tcp_oos_setup(void) { old_netif_list = netif_list; old_netif_default = netif_default; netif_list = NULL; netif_default = NULL; tcp_remove_all(); lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); }
static void tcp_oos_teardown(void) { netif_list = NULL; netif_default = NULL; tcp_remove_all(); /* 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)); }
static void ip6_teardown(void) { if (netif_list->loop_first != NULL) { pbuf_free(netif_list->loop_first); netif_list->loop_first = NULL; } netif_list->loop_last = NULL; /* poll until all memory is released... */ tcpip_thread_poll_one(); default_netif_remove(); lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); }
static void sockets_teardown(void) { fail_unless(test_sockets_get_used_count() == 0); /* poll until all memory is released... */ tcpip_thread_poll_one(); while (tcp_tw_pcbs) { tcp_abort(tcp_tw_pcbs); tcpip_thread_poll_one(); } tcpip_thread_poll_one(); /* ensure full free heap */ lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); }
static void tcp_setup(void) { old_netif_list = netif_list; old_netif_default = netif_default; netif_list = NULL; netif_default = NULL; /* reset iss to default (6510) */ tcp_ticks = 0; tcp_ticks = 0 - (tcp_next_iss(NULL) - 6510); tcp_next_iss(NULL); tcp_ticks = 0; test_tcp_timer = 0; tcp_remove_all(); lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); }
static void dhcp_teardown(void) { lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); }
static void dhcp_setup(void) { txpacket = 0; lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); }
static void ip6_setup(void) { default_netif_add(); lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); }
static void mem_setup(void) { lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); }
static void sockets_setup(void) { /* expect full free heap */ lwip_check_ensure_no_alloc(SKIP_POOL(MEMP_SYS_TIMEOUT)); }