Skip to contentSkip to conversation

selftests: futex: set DEFAULT_INSTALL_HDR_PATH

PATCH In review Muhammad Usama Anjum 2 participants 5 messages Jan 19, 2022 – Feb 7, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests: futex: set DEFAULT_INSTALL_HDR_PATH

If only futex selftest is compiled, uapi header files are copied to the selftests/futex/functional directory. This copy isn't needed. Set the DEFAULT_INSTALL_HDR_PATH variable to 1 to use the default header install path only. This removes extra copy of header file.

---
 tools/testing/selftests/futex/functional/Makefile | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/futex/functional/Makefile +1 -0
index 5cc38de9d8ea..9a8c3700d773 100644
@@ -24,6 +24,7 @@ TEST_PROGS := run.sh
 
 top_srcdir = ../../../../..
 KSFT_KHDR_INSTALL := 1
+DEFAULT_INSTALL_HDR_PATH := 1
 include ../../lib.mk
 
 $(TEST_GEN_FILES): $(HEADERS)
Signature · 1 line
2.30.2
#1 lore raw

Thoughts?

Quoted 22 lines · Muhammad Usama Anjum

If only futex selftest is compiled, uapi header files are copied to the selftests/futex/functional directory. This copy isn't needed. Set the DEFAULT_INSTALL_HDR_PATH variable to 1 to use the default header install path only. This removes extra copy of header file.

---
 tools/testing/selftests/futex/functional/Makefile | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/futex/functional/Makefile +1 -0
index 5cc38de9d8ea..9a8c3700d773 100644
@@ -24,6 +24,7 @@ TEST_PROGS := run.sh
 
 top_srcdir = ../../../../..
 KSFT_KHDR_INSTALL := 1
+DEFAULT_INSTALL_HDR_PATH := 1
 include ../../lib.mk
 
 $(TEST_GEN_FILES): $(HEADERS)
maintainer
#2 lore raw
In reply to Muhammad Usama Anjum
Quoted 16 lines · Muhammad Usama Anjum

If only futex selftest is compiled, uapi header files are copied to the selftests/futex/functional directory. This copy isn't needed. Set the DEFAULT_INSTALL_HDR_PATH variable to 1 to use the default header install path only. This removes extra copy of header file.

---
  tools/testing/selftests/futex/functional/Makefile | 1 +
  1 file changed, 1 insertion(+)
tools/testing/selftests/futex/functional/Makefile +0 -0
index 5cc38de9d8ea..9a8c3700d773 100644

tools/testing/selftests/futex/functional/Makefile TEST_PROGS := run.sh · line 30

Quoted 7 lines
tools/testing/selftests/futex/functional/Makefile +1 -0
@@ -24,6 +24,7 @@ TEST_PROGS := run.sh
 
  top_srcdir = ../../../../..
  KSFT_KHDR_INSTALL := 1
+DEFAULT_INSTALL_HDR_PATH := 1
  include ../../lib.mk
 
  $(TEST_GEN_FILES): $(HEADERS)

This will be a good cleanup. However, please make there is no dependencies in the futex test sub-dirs on being able to find the headers under futex

I vaguely remember leaving this in place for reason.

thanks,
-- Shuah

#3 lore raw
Quoted 11 lines · Shuah Khan
Quoted 10 lines · Muhammad Usama Anjum

If only futex selftest is compiled, uapi header files are copied to the selftests/futex/functional directory. This copy isn't needed. Set the DEFAULT_INSTALL_HDR_PATH variable to 1 to use the default header install path only. This removes extra copy of header file.

---
  tools/testing/selftests/futex/functional/Makefile | 1 +

  1 file changed, 1 insertion(+)
Quoted 16 lines
Quoted 6 lines
tools/testing/selftests/futex/functional/Makefile +0 -0
index 5cc38de9d8ea..9a8c3700d773 100644
@@ -24,6 +24,7 @@ TEST_PROGS := run.sh
Quoted 6 lines

    top_srcdir = ../../../../..
  KSFT_KHDR_INSTALL := 1
+DEFAULT_INSTALL_HDR_PATH := 1
  include ../../lib.mk
    $(TEST_GEN_FILES): $(HEADERS)

This will be a good cleanup. However, please make there is no dependencies in the futex test sub-dirs on being able to find the headers under futex

I've tried the following variations. The build is fine.

cd tools/testing/selftests/futex/functional
make

cd tools/testing/selftests/futex/
make

make -C tools/testing/selftests/

Quoted 2 lines

I vaguely remember leaving this in place for reason.

This must have been fixed in previous changes made to the build system.

Quoted 3 lines

thanks,
-- Shuah

maintainer
#4 lore raw
Quoted 33 lines · Muhammad Usama Anjum
Quoted 11 lines · Shuah Khan
Quoted 10 lines · Muhammad Usama Anjum

If only futex selftest is compiled, uapi header files are copied to the selftests/futex/functional directory. This copy isn't needed. Set the DEFAULT_INSTALL_HDR_PATH variable to 1 to use the default header install path only. This removes extra copy of header file.

---
   tools/testing/selftests/futex/functional/Makefile | 1 +
   1 file changed, 1 insertion(+)
Quoted 16 lines

tools/testing/selftests/futex/functional/Makefile TEST_PROGS := run.sh · line 29

Quoted 12 lines
tools/testing/selftests/futex/functional/Makefile +1 -0
index 5cc38de9d8ea..9a8c3700d773 100644
@@ -24,6 +24,7 @@ TEST_PROGS := run.sh
     top_srcdir = ../../../../..
   KSFT_KHDR_INSTALL := 1
+DEFAULT_INSTALL_HDR_PATH := 1
   include ../../lib.mk
     $(TEST_GEN_FILES): $(HEADERS)
 

This will be a good cleanup. However, please make there is no dependencies in the futex test sub-dirs on being able to find the headers under futex

I've tried the following variations. The build is fine.

cd tools/testing/selftests/futex/functional
make

Quoted 9 lines

cd tools/testing/selftests/futex/
make

make -C tools/testing/selftests/

Quoted 2 lines

I vaguely remember leaving this in place for reason.

This must have been fixed in previous changes made to the build system.

Thanks for checking. I will apply this in for Linux 5.18-rc1

thanks,
-- Shuah