1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 22:43:50 +01:00

tests/gnrc_netif: use thread_has_msg_queue() for msg queue check

This commit is contained in:
Martine Lenders 2018-11-15 14:11:16 +01:00 committed by Martine Lenders
parent a14e33df01
commit 91b526b0ad

View File

@ -131,7 +131,7 @@ static void test_creation(void)
#ifdef DEVELHELP
TEST_ASSERT_EQUAL_STRING("eth", sched_threads[ethernet_netif->pid]->name);
#endif
TEST_ASSERT_NOT_NULL(sched_threads[ethernet_netif->pid]->msg_array);
TEST_ASSERT(thread_has_msg_queue(sched_threads[ethernet_netif->pid]));
TEST_ASSERT_NOT_NULL((ieee802154_netif = gnrc_netif_ieee802154_create(
ieee802154_netif_stack, IEEE802154_STACKSIZE, GNRC_NETIF_PRIO,
@ -153,7 +153,7 @@ static void test_creation(void)
#ifdef DEVELHELP
TEST_ASSERT_EQUAL_STRING("wpan", sched_threads[ieee802154_netif->pid]->name);
#endif
TEST_ASSERT_NOT_NULL(sched_threads[ieee802154_netif->pid]->msg_array);
TEST_ASSERT(thread_has_msg_queue(sched_threads[ieee802154_netif->pid]));
for (unsigned i = 0; i < DEFAULT_DEVS_NUMOF; i++) {
TEST_ASSERT_NOT_NULL((netifs[i] = gnrc_netif_create(
@ -165,7 +165,7 @@ static void test_creation(void)
TEST_ASSERT_EQUAL_INT(GNRC_NETIF_DEFAULT_HL, netifs[i]->cur_hl);
TEST_ASSERT_EQUAL_INT(NETDEV_TYPE_UNKNOWN, netifs[i]->device_type);
TEST_ASSERT(netifs[i]->pid > KERNEL_PID_UNDEF);
TEST_ASSERT_NOT_NULL(sched_threads[netifs[i]->pid]->msg_array);
TEST_ASSERT(thread_has_msg_queue(sched_threads[netifs[i]->pid]));
TEST_ASSERT_EQUAL_INT(i + SPECIAL_DEVS + 1, gnrc_netif_numof());
for (unsigned j = 0; j < (i + SPECIAL_DEVS + 1); j++) {
TEST_ASSERT_NOT_NULL((ptr = gnrc_netif_iter(ptr)));