tools/testing/selftests/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
We have the logic to include net/lib automatically for net related
selftests. However, currently, this logic is only in install target
which means only `make install` will have net/lib included. This commit
moves the logic to all target so that all `make`, `make run_tests` and
`make install` will have net/lib included in net related selftests.
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com>
---
Changes in v2:
- Make the commit message clearer.
tools/testing/selftests/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 6aa11cd3db42..5b04d83ad9a1 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -205,7 +205,7 @@ export KHDR_INCLUDES
all:
@ret=1; \
- for TARGET in $(TARGETS); do \
+ for TARGET in $(TARGETS) $(INSTALL_DEP_TARGETS); do \
BUILD_TARGET=$$BUILD/$$TARGET; \
mkdir $$BUILD_TARGET -p; \
$(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET \
@@ -270,7 +270,7 @@ ifdef INSTALL_PATH
install -m 744 run_kselftest.sh $(INSTALL_PATH)/
rm -f $(TEST_LIST)
@ret=1; \
- for TARGET in $(TARGETS) $(INSTALL_DEP_TARGETS); do \
+ for TARGET in $(TARGETS); do \
BUILD_TARGET=$$BUILD/$$TARGET; \
$(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET install \
INSTALL_PATH=$(INSTALL_PATH)/$$TARGET \
--
2.43.0
On 5/31/25 12:10, Bui Quang Minh wrote: > We have the logic to include net/lib automatically for net related > selftests. However, currently, this logic is only in install target > which means only `make install` will have net/lib included. This commit > moves the logic to all target so that all `make`, `make run_tests` and > `make install` will have net/lib included in net related selftests. > > Reviewed-by: Jakub Kicinski <kuba@kernel.org> > Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com> > --- > Changes in v2: > - Make the commit message clearer. > > tools/testing/selftests/Makefile | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile > index 6aa11cd3db42..5b04d83ad9a1 100644 > --- a/tools/testing/selftests/Makefile > +++ b/tools/testing/selftests/Makefile > @@ -205,7 +205,7 @@ export KHDR_INCLUDES > > all: > @ret=1; \ > - for TARGET in $(TARGETS); do \ > + for TARGET in $(TARGETS) $(INSTALL_DEP_TARGETS); do \ > BUILD_TARGET=$$BUILD/$$TARGET; \ > mkdir $$BUILD_TARGET -p; \ > $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET \ > @@ -270,7 +270,7 @@ ifdef INSTALL_PATH > install -m 744 run_kselftest.sh $(INSTALL_PATH)/ > rm -f $(TEST_LIST) > @ret=1; \ > - for TARGET in $(TARGETS) $(INSTALL_DEP_TARGETS); do \ > + for TARGET in $(TARGETS); do \ > BUILD_TARGET=$$BUILD/$$TARGET; \ > $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET install \ > INSTALL_PATH=$(INSTALL_PATH)/$$TARGET \ I'm sorry but please don't merge this. I realize that we cannot remove INSTALL_DEP_TARGETS in install target, if we do so, net/lib will not be copied the the INSTALL_PATH. I'll post a version 3 shortly after. Thanks, Quang Minh.
© 2016 - 2025 Red Hat, Inc.