diff mbox series

selftests: futex: set DEFAULT_INSTALL_HDR_PATH

Message ID 20220119103332.2887370-1-usama.anjum@collabora.com (mailing list archive)
State Accepted
Headers show
Series selftests: futex: set DEFAULT_INSTALL_HDR_PATH | expand

Commit Message

Muhammad Usama Anjum Jan. 19, 2022, 10:33 a.m. UTC
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.

Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
---
 tools/testing/selftests/futex/functional/Makefile | 1 +
 1 file changed, 1 insertion(+)

Comments

Muhammad Usama Anjum Feb. 6, 2022, 6:56 p.m. UTC | #1
Thoughts?

On 1/19/22 3:33 PM, Muhammad Usama Anjum wrote:
> 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.
> 
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
> ---
>  tools/testing/selftests/futex/functional/Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile
> index 5cc38de9d8ea..9a8c3700d773 100644
> --- a/tools/testing/selftests/futex/functional/Makefile
> +++ b/tools/testing/selftests/futex/functional/Makefile
> @@ -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)
Shuah Khan Feb. 7, 2022, 6:40 p.m. UTC | #2
On 1/19/22 3:33 AM, Muhammad Usama Anjum wrote:
> 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.
> 
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
> ---
>   tools/testing/selftests/futex/functional/Makefile | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile
> index 5cc38de9d8ea..9a8c3700d773 100644
> --- a/tools/testing/selftests/futex/functional/Makefile
> +++ b/tools/testing/selftests/futex/functional/Makefile
> @@ -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
Muhammad Usama Anjum Feb. 7, 2022, 8:50 p.m. UTC | #3
On 2/7/22 11:40 PM, Shuah Khan wrote:
> On 1/19/22 3:33 AM, Muhammad Usama Anjum wrote:
>> 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.
>>
>> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
>> ---
>>   tools/testing/selftests/futex/functional/Makefile | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/tools/testing/selftests/futex/functional/Makefile
>> b/tools/testing/selftests/futex/functional/Makefile
>> index 5cc38de9d8ea..9a8c3700d773 100644
>> --- a/tools/testing/selftests/futex/functional/Makefile
>> +++ b/tools/testing/selftests/futex/functional/Makefile
>> @@ -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

cd tools/testing/selftests/futex/
make

make -C tools/testing/selftests/

> I vaguely remember leaving this in place for reason.
> 
This must have been fixed in previous changes made to the build system.

> thanks,
> -- Shuah
>
Shuah Khan Feb. 7, 2022, 9:31 p.m. UTC | #4
On 2/7/22 1:50 PM, Muhammad Usama Anjum wrote:
> On 2/7/22 11:40 PM, Shuah Khan wrote:
>> On 1/19/22 3:33 AM, Muhammad Usama Anjum wrote:
>>> 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.
>>>
>>> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
>>> ---
>>>    tools/testing/selftests/futex/functional/Makefile | 1 +
>>>    1 file changed, 1 insertion(+)
>>>
>>> diff --git a/tools/testing/selftests/futex/functional/Makefile
>>> b/tools/testing/selftests/futex/functional/Makefile
>>> index 5cc38de9d8ea..9a8c3700d773 100644
>>> --- a/tools/testing/selftests/futex/functional/Makefile
>>> +++ b/tools/testing/selftests/futex/functional/Makefile
>>> @@ -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
> 
> cd tools/testing/selftests/futex/
> make
> 
> make -C tools/testing/selftests/
> 
>> 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
diff mbox series

Patch

diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile
index 5cc38de9d8ea..9a8c3700d773 100644
--- a/tools/testing/selftests/futex/functional/Makefile
+++ b/tools/testing/selftests/futex/functional/Makefile
@@ -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)