linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests/interpreter: fix separate directory build
@ 2022-03-03 11:06 Muhammad Usama Anjum
  2022-03-03 21:39 ` Shuah Khan
  0 siblings, 1 reply; 4+ messages in thread
From: Muhammad Usama Anjum @ 2022-03-03 11:06 UTC (permalink / raw)
  To: Shuah Khan; +Cc: Muhammad Usama Anjum, kernel, linux-kselftest, linux-kernel

Separate directory build fails of this test as headers include path isn't
set correctly in that case. Fix it by including KHDR_INCLUDES.

make -C tools/testing/selftests O=build1
gcc -Wall -O2 -I../../../../usr/include    trust_policy_test.c -lcap -o /linux_mainline/build1/kselftest/interpreter/trust_policy_test
trust_policy_test.c:14:10: fatal error: linux/trusted-for.h: No such file or directory
   14 | #include <linux/trusted-for.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.

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

diff --git a/tools/testing/selftests/interpreter/Makefile b/tools/testing/selftests/interpreter/Makefile
index 7402fdb6533f..51dde8e01e32 100644
--- a/tools/testing/selftests/interpreter/Makefile
+++ b/tools/testing/selftests/interpreter/Makefile
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 
-CFLAGS += -Wall -O2 -I$(khdr_dir)
+CFLAGS += -Wall -O2 -I$(khdr_dir) $(KHDR_INCLUDES)
 LDLIBS += -lcap
 
 src_test := $(wildcard *_test.c)
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] selftests/interpreter: fix separate directory build
  2022-03-03 11:06 [PATCH] selftests/interpreter: fix separate directory build Muhammad Usama Anjum
@ 2022-03-03 21:39 ` Shuah Khan
  2022-03-04  7:34   ` Muhammad Usama Anjum
  0 siblings, 1 reply; 4+ messages in thread
From: Shuah Khan @ 2022-03-03 21:39 UTC (permalink / raw)
  To: Muhammad Usama Anjum, Shuah Khan
  Cc: kernel, linux-kselftest, linux-kernel, Shuah Khan

On 3/3/22 4:06 AM, Muhammad Usama Anjum wrote:
> Separate directory build fails of this test as headers include path isn't
> set correctly in that case. Fix it by including KHDR_INCLUDES.
> 
> make -C tools/testing/selftests O=build1
> gcc -Wall -O2 -I../../../../usr/include    trust_policy_test.c -lcap -o /linux_mainline/build1/kselftest/interpreter/trust_policy_test
> trust_policy_test.c:14:10: fatal error: linux/trusted-for.h: No such file or directory
>     14 | #include <linux/trusted-for.h>
>        |          ^~~~~~~~~~~~~~~~~~~~~
> compilation terminated.
> 
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
> ---
>   tools/testing/selftests/interpreter/Makefile | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/interpreter/Makefile b/tools/testing/selftests/interpreter/Makefile
> index 7402fdb6533f..51dde8e01e32 100644
> --- a/tools/testing/selftests/interpreter/Makefile
> +++ b/tools/testing/selftests/interpreter/Makefile
> @@ -1,6 +1,6 @@
>   # SPDX-License-Identifier: GPL-2.0
>   
> -CFLAGS += -Wall -O2 -I$(khdr_dir)
> +CFLAGS += -Wall -O2 -I$(khdr_dir) $(KHDR_INCLUDES)
>   LDLIBS += -lcap
>   

Change looks fine to me.

>   src_test := $(wildcard *_test.c)
> 

I am not seeing this test in linux-kselftest next for sure. Which tree is
this patch based on? Please  add the repo info to the patch subject line
in the future.

Either way I don't have the patch that added in liunx-kselftest repo:

Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] selftests/interpreter: fix separate directory build
  2022-03-03 21:39 ` Shuah Khan
@ 2022-03-04  7:34   ` Muhammad Usama Anjum
  2022-03-04  9:46     ` Mickaël Salaün
  0 siblings, 1 reply; 4+ messages in thread
From: Muhammad Usama Anjum @ 2022-03-04  7:34 UTC (permalink / raw)
  To: Shuah Khan, Shuah Khan
  Cc: usama.anjum, kernel, linux-kselftest, linux-kernel, mic, Al Viro,
	Andrew Morton

On 3/4/22 2:39 AM, Shuah Khan wrote:
> On 3/3/22 4:06 AM, Muhammad Usama Anjum wrote:
>> Separate directory build fails of this test as headers include path isn't
>> set correctly in that case. Fix it by including KHDR_INCLUDES.
>>
>> make -C tools/testing/selftests O=build1
>> gcc -Wall -O2 -I../../../../usr/include    trust_policy_test.c -lcap
>> -o /linux_mainline/build1/kselftest/interpreter/trust_policy_test
>> trust_policy_test.c:14:10: fatal error: linux/trusted-for.h: No such
>> file or directory
>>     14 | #include <linux/trusted-for.h>
>>        |          ^~~~~~~~~~~~~~~~~~~~~
>> compilation terminated.
>>
>> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
>> ---
>>   tools/testing/selftests/interpreter/Makefile | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/interpreter/Makefile
>> b/tools/testing/selftests/interpreter/Makefile
>> index 7402fdb6533f..51dde8e01e32 100644
>> --- a/tools/testing/selftests/interpreter/Makefile
>> +++ b/tools/testing/selftests/interpreter/Makefile
>> @@ -1,6 +1,6 @@
>>   # SPDX-License-Identifier: GPL-2.0
>>   -CFLAGS += -Wall -O2 -I$(khdr_dir)
>> +CFLAGS += -Wall -O2 -I$(khdr_dir) $(KHDR_INCLUDES)
>>   LDLIBS += -lcap
>>   
> 
> Change looks fine to me.
> 
>>   src_test := $(wildcard *_test.c)
>>
> 
> I am not seeing this test in linux-kselftest next for sure. Which tree is
> this patch based on? Please  add the repo info to the patch subject line
> in the future.
> 
This patch is in linux-next and its build is failing from quite some time:
https://storage.staging.kernelci.org/kernelci/staging-next/staging-next-20220301.0/x86_64/x86_64_defconfig+x86-chromebook+kselftest/gcc-10/logs/kselftest.log

I'm not sure in which tree selftests/interpreter is present. It was sent
here:
https://lore.kernel.org/lkml/20220104155024.48023-5-mic@digikod.net/

How can I find the tree from which this patch is coming?

> Either way I don't have the patch that added in liunx-kselftest repo:
> 
> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
> 
> thanks,
> -- Shuah

I forgot to add the tag:
Reported-by: "kernelci.org bot" <bot@kernelci.org>

--
Muhammad Usama Anjum

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] selftests/interpreter: fix separate directory build
  2022-03-04  7:34   ` Muhammad Usama Anjum
@ 2022-03-04  9:46     ` Mickaël Salaün
  0 siblings, 0 replies; 4+ messages in thread
From: Mickaël Salaün @ 2022-03-04  9:46 UTC (permalink / raw)
  To: Muhammad Usama Anjum, Shuah Khan, Shuah Khan
  Cc: kernel, linux-kselftest, linux-kernel, Al Viro, Andrew Morton


On 04/03/2022 08:34, Muhammad Usama Anjum wrote:
> On 3/4/22 2:39 AM, Shuah Khan wrote:
>> On 3/3/22 4:06 AM, Muhammad Usama Anjum wrote:
>>> Separate directory build fails of this test as headers include path isn't
>>> set correctly in that case. Fix it by including KHDR_INCLUDES.
>>>
>>> make -C tools/testing/selftests O=build1
>>> gcc -Wall -O2 -I../../../../usr/include    trust_policy_test.c -lcap
>>> -o /linux_mainline/build1/kselftest/interpreter/trust_policy_test
>>> trust_policy_test.c:14:10: fatal error: linux/trusted-for.h: No such
>>> file or directory
>>>      14 | #include <linux/trusted-for.h>
>>>         |          ^~~~~~~~~~~~~~~~~~~~~
>>> compilation terminated.
>>>
>>> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>

Reviewed-by: Mickaël Salaün <mic@linux.microsoft.com>

>>> ---
>>>    tools/testing/selftests/interpreter/Makefile | 2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/tools/testing/selftests/interpreter/Makefile
>>> b/tools/testing/selftests/interpreter/Makefile
>>> index 7402fdb6533f..51dde8e01e32 100644
>>> --- a/tools/testing/selftests/interpreter/Makefile
>>> +++ b/tools/testing/selftests/interpreter/Makefile
>>> @@ -1,6 +1,6 @@
>>>    # SPDX-License-Identifier: GPL-2.0
>>>    -CFLAGS += -Wall -O2 -I$(khdr_dir)
>>> +CFLAGS += -Wall -O2 -I$(khdr_dir) $(KHDR_INCLUDES)
>>>    LDLIBS += -lcap
>>>    
>>
>> Change looks fine to me.
>>
>>>    src_test := $(wildcard *_test.c)
>>>
>>
>> I am not seeing this test in linux-kselftest next for sure. Which tree is
>> this patch based on? Please  add the repo info to the patch subject line
>> in the future.
>>
> This patch is in linux-next and its build is failing from quite some time:
> https://storage.staging.kernelci.org/kernelci/staging-next/staging-next-20220301.0/x86_64/x86_64_defconfig+x86-chromebook+kselftest/gcc-10/logs/kselftest.log
> 
> I'm not sure in which tree selftests/interpreter is present. It was sent
> here:
> https://lore.kernel.org/lkml/20220104155024.48023-5-mic@digikod.net/
> 
> How can I find the tree from which this patch is coming?

As explained in the cover letter, it is now in my tree. To get the list 
of people to contact (and Cc) you should use ./script/get_maintainer.pl
The KHDR_INCLUDES series [1] was merged after the selftests/interpreter 
commits, hence the confusion with these two forks. Because make doesn't 
care about unknown variables, and to get a consistent series, I'll apply 
this patch just after the selftests/interpreter one. Thanks!

[1] 
https://lore.kernel.org/all/20220119101531.2850400-1-usama.anjum@collabora.com/


> 
>> Either way I don't have the patch that added in liunx-kselftest repo:
>>
>> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
>>
>> thanks,
>> -- Shuah
> 
> I forgot to add the tag:
> Reported-by: "kernelci.org bot" <bot@kernelci.org>
> 
> --
> Muhammad Usama Anjum

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-04  9:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-03 11:06 [PATCH] selftests/interpreter: fix separate directory build Muhammad Usama Anjum
2022-03-03 21:39 ` Shuah Khan
2022-03-04  7:34   ` Muhammad Usama Anjum
2022-03-04  9:46     ` Mickaël Salaün

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).