Skip to content

Commit

Permalink
tests/unittests: use thread_has_queue() for msg queue check
Browse files Browse the repository at this point in the history
  • Loading branch information
miri64 committed Nov 15, 2018
1 parent d77e03b commit 1631d29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/gnrc_netif/main.c
Expand Up @@ -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_queue(sched_threads[ethernet_netif->pid]));

TEST_ASSERT_NOT_NULL((ieee802154_netif = gnrc_netif_ieee802154_create(
ieee802154_netif_stack, IEEE802154_STACKSIZE, GNRC_NETIF_PRIO,
Expand All @@ -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_queue(sched_threads[ieee802154_netif->pid]));

for (unsigned i = 0; i < DEFAULT_DEVS_NUMOF; i++) {
TEST_ASSERT_NOT_NULL((netifs[i] = gnrc_netif_create(
Expand All @@ -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_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)));
Expand Down

0 comments on commit 1631d29

Please sign in to comment.