Merge pull request #14788 from leandrolanzieri/pr/fuzzing/select_gnrc_pktbuf_malloc

fuzzing: select gnrc_pktbuf_malloc implementation
This commit is contained in:
Martine Lenders 2020-08-25 16:05:46 +02:00 committed by GitHub
commit ec3464aaeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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