fuzzing: select gnrc_pktbuf_malloc implementation

This commit is contained in:
Leandro Lanzieri 2020-08-17 11:41:40 +02:00
parent 53187c5ef7
commit ff8079b109
No known key found for this signature in database
GPG Key ID: 13559905E2EBEAA5
3 changed files with 15 additions and 6 deletions

View File

@ -636,6 +636,12 @@ ifneq (,$(filter cpp11-compat,$(USEMODULE)))
FEATURES_REQUIRED += libstdcpp
endif
ifneq (,$(filter fuzzing,$(USEMODULE)))
USEMODULE += netdev_test
USEMODULE += gnrc_netif
USEMODULE += gnrc_pktbuf_malloc
endif
ifneq (,$(filter gnrc,$(USEMODULE)))
USEMODULE += gnrc_netapi
USEMODULE += gnrc_netreg
@ -742,12 +748,6 @@ ifneq (,$(filter evtimer_mbox,$(USEMODULE)))
USEMODULE += core_mbox
endif
ifneq (,$(filter fuzzing,$(USEMODULE)))
USEMODULE += netdev_test
USEMODULE += gnrc_netif
USEMODULE += gnrc_pktbuf_malloc
endif
ifneq (,$(filter can_linux,$(USEMODULE)))
LINKFLAGS += -lsocketcan
endif

View File

@ -17,6 +17,10 @@ ifneq (,$(filter gnrc_sock_async,$(USEMODULE)))
CFLAGS += -DSOCK_HAS_ASYNC
endif
ifneq (,$(filter gnrc_pktbuf,$(USEMODULE)))
include $(RIOTBASE)/sys/net/gnrc/pktbuf/Makefile.include
endif
ifneq (,$(filter posix_headers,$(USEMODULE)))
USEMODULE_INCLUDES += $(RIOTBASE)/sys/posix/include
endif

View File

@ -0,0 +1,5 @@
# Check that only one implementation of pktbuf is used
USED_PKTBUF_IMPLEMENTATIONS := $(filter-out gnrc_pktbuf_cmd,$(filter gnrc_pktbuf_%,$(USEMODULE)))
ifneq (1,$(words $(USED_PKTBUF_IMPLEMENTATIONS)))
$(error Only one implementation of gnrc_pktbuf should be used. Currently using: $(USED_PKTBUF_IMPLEMENTATIONS))
endif