unittests: fix gnrc_ipv6_nib test#8177
Conversation
miri64
left a comment
There was a problem hiding this comment.
Minor comment, otherwise I am ready to ACK this.
| void *iter_state = NULL; | ||
| static const ipv6_addr_t addr = { .u64 = { { .u8 = GLOBAL_PREFIX }, | ||
| { .u64 = TEST_UINT64 } } }; | ||
| uint8_t l2addr[] = L2ADDR; |
There was a problem hiding this comment.
copy-pasta from other test-case above - could fix, but then in multiple places
There was a problem hiding this comment.
Since the topic of this PR is "fix gnrc_ipv6_nib test" I have no problem with that ;-)
There was a problem hiding this comment.
ah no, though its copy-pasta, in other tests l2addr is modified (i.e. l2addr++), so here static const but other places are good as is ...
There was a problem hiding this comment.
Wait... now that I think about it: why did you add the l2addr in the first place? nc_set() should work with l2addr being NULL (since there are link-layers like e.g. SLIP that don't have link-layer addresses).
| gnrc_ipv6_nib_nc_t nce; | ||
|
|
||
| TEST_ASSERT_EQUAL_INT(0, gnrc_ipv6_nib_nc_set(&addr, IFACE, NULL, 0)); | ||
| TEST_ASSERT_EQUAL_INT(0, gnrc_ipv6_nib_nc_set(&addr, IFACE, l2addr, |
There was a problem hiding this comment.
If #8179 get's merged I would prefer this change to be reverted.
d8401f8 to
1dfe371
Compare
|
rebase, squashed and adapted |
discovered failed assertion when enabling DEVELHELP for unit tests of gnrc_ipv6_nib, this PR fixes them (see Murdock error here [edit]-> PR #8080).