mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tests/gnrc_sock_udp: include sock_aux_ttl in test
This commit is contained in:
parent
5a0550e96e
commit
ebaf4b9f09
@ -3,6 +3,7 @@ include ../Makefile.net_common
|
||||
AUX_LOCAL ?= 1
|
||||
AUX_TIMESTAMP ?= 1
|
||||
AUX_RSSI ?= 1
|
||||
AUX_TTL ?= 1
|
||||
|
||||
ifeq (1, $(AUX_LOCAL))
|
||||
USEMODULE += sock_aux_local
|
||||
@ -16,6 +17,10 @@ ifeq (1, $(AUX_RSSI))
|
||||
USEMODULE += sock_aux_rssi
|
||||
endif
|
||||
|
||||
ifeq (1, $(AUX_TTL))
|
||||
USEMODULE += sock_aux_ttl
|
||||
endif
|
||||
|
||||
USEMODULE += gnrc_sock_check_reuse
|
||||
USEMODULE += sock_udp
|
||||
USEMODULE += gnrc_ipv6
|
||||
|
@ -451,7 +451,7 @@ static void test_sock_udp_recv__aux(void)
|
||||
static const inject_aux_t inject_aux = { .timestamp = 1337, .rssi = -11 };
|
||||
sock_udp_ep_t result;
|
||||
sock_udp_aux_rx_t aux = {
|
||||
.flags = SOCK_AUX_GET_LOCAL | SOCK_AUX_GET_TIMESTAMP | SOCK_AUX_GET_RSSI
|
||||
.flags = SOCK_AUX_GET_LOCAL | SOCK_AUX_GET_TIMESTAMP | SOCK_AUX_GET_RSSI | SOCK_AUX_GET_TTL
|
||||
};
|
||||
|
||||
expect(0 == sock_udp_create(&_sock, &local, NULL, SOCK_FLAGS_REUSE_EP));
|
||||
@ -483,6 +483,12 @@ static void test_sock_udp_recv__aux(void)
|
||||
expect(inject_aux.rssi == aux.rssi);
|
||||
#else
|
||||
expect(aux.flags & SOCK_AUX_GET_RSSI);
|
||||
#endif
|
||||
#if IS_USED(MODULE_SOCK_AUX_TTL)
|
||||
expect(!(aux.flags & SOCK_AUX_GET_TTL));
|
||||
expect(64 == aux.ttl);
|
||||
#else
|
||||
expect(aux.flags & SOCK_AUX_GET_TTL);
|
||||
#endif
|
||||
expect(_check_net());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user