+# SPDX-License-Identifier: GPL-2.0
## -- Config --
DEV := lo
PREFIX := sudo -E unshare -n
ifneq (,$(wildcard /proc/config.gz))
KENV := $(shell cat /proc/config.gz | gunzip | grep ^CONFIG)
+else
+KVER := $(shell uname -r)
+KCPATHS := /lib/modules/$(KVER)/config /boot/config-$(KVER)
+KCPATH := $(firstword $(wildcard $(KCPATHS)))
+ifneq (,$(KCPATH))
+ KENV := $(shell cat ${KCPATH} | grep ^CONFIG)
+endif
endif
.PHONY: compile listtests alltests configure $(TESTS)
ifeq (,$(HAVE_UNSHARED_UTIL))
$(error Please install util-linux tools to run tests in separated network namespace)
endif
+ @./tools/generate_nlmsg
+
@mkdir -p $(RESULTS_DIR)
@for d in $(TESTS_DIR); do \