linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests/exec: Add Makefile to install list since exec test expect it
@ 2016-06-14 18:45 Yannick Brosseau
  2016-06-14 19:09 ` Shuah Khan
  0 siblings, 1 reply; 4+ messages in thread
From: Yannick Brosseau @ 2016-06-14 18:45 UTC (permalink / raw)
  To: shuahkh, linux-kselftest, linux-kernel; +Cc: kernel-team, Yannick Brosseau

When running the execveat test once installed, the Makefile it not available and the
test fail. Bundling the Makefile file with the installed files fix that.

Signed-off-by: Yannick Brosseau <scientist@fb.com>
---
 tools/testing/selftests/exec/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/exec/Makefile b/tools/testing/selftests/exec/Makefile
index 4e400eb..d2be580 100644
--- a/tools/testing/selftests/exec/Makefile
+++ b/tools/testing/selftests/exec/Makefile
@@ -1,6 +1,6 @@
 CFLAGS = -Wall
 BINARIES = execveat
-DEPS = execveat.symlink execveat.denatured script subdir
+DEPS = execveat.symlink execveat.denatured script subdir Makefile
 all: $(BINARIES) $(DEPS)
 
 subdir:
-- 
2.8.1

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

* Re: [PATCH] selftests/exec: Add Makefile to install list since exec test expect it
  2016-06-14 18:45 [PATCH] selftests/exec: Add Makefile to install list since exec test expect it Yannick Brosseau
@ 2016-06-14 19:09 ` Shuah Khan
  2016-06-14 19:15   ` Yannick Brosseau
  0 siblings, 1 reply; 4+ messages in thread
From: Shuah Khan @ 2016-06-14 19:09 UTC (permalink / raw)
  To: Yannick Brosseau, linux-kselftest, linux-kernel; +Cc: kernel-team, Shuah Khan

On 06/14/2016 12:45 PM, Yannick Brosseau wrote:
> When running the execveat test once installed, the Makefile it not available and the
> test fail. Bundling the Makefile file with the installed files fix that.

Install is for installing kselftest binaries and run-time dependencies
if any on a target system. It is not for being able to build it on the
target. Bundling Makefile doesn't make sense.

-- Shuah

> 
> Signed-off-by: Yannick Brosseau <scientist@fb.com>
> ---
>  tools/testing/selftests/exec/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/exec/Makefile b/tools/testing/selftests/exec/Makefile
> index 4e400eb..d2be580 100644
> --- a/tools/testing/selftests/exec/Makefile
> +++ b/tools/testing/selftests/exec/Makefile
> @@ -1,6 +1,6 @@
>  CFLAGS = -Wall
>  BINARIES = execveat
> -DEPS = execveat.symlink execveat.denatured script subdir
> +DEPS = execveat.symlink execveat.denatured script subdir Makefile
>  all: $(BINARIES) $(DEPS)
>  
>  subdir:
> 

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

* Re: [PATCH] selftests/exec: Add Makefile to install list since exec test expect it
  2016-06-14 19:09 ` Shuah Khan
@ 2016-06-14 19:15   ` Yannick Brosseau
  2016-06-14 19:22     ` Shuah Khan
  0 siblings, 1 reply; 4+ messages in thread
From: Yannick Brosseau @ 2016-06-14 19:15 UTC (permalink / raw)
  To: Shuah Khan, linux-kselftest, linux-kernel; +Cc: kernel-team

On 06/14/2016 12:09 PM, Shuah Khan wrote:
> On 06/14/2016 12:45 PM, Yannick Brosseau wrote:
>> When running the execveat test once installed, the Makefile it not available and the
>> test fail. Bundling the Makefile file with the installed files fix that.
> Install is for installing kselftest binaries and run-time dependencies
> if any on a target system. It is not for being able to build it on the
> target. Bundling Makefile doesn't make sense.
The test tries to exec the Makefile file:
    fail += check_execveat_fail(dot_dfd, "Makefile", 0, EACCES);

So it's a runtime dependency at the moment.
We can either change the test to try to open another file or add the
Makefile

Yannick





> -- Shuah
>
>> Signed-off-by: Yannick Brosseau <scientist@fb.com>
>> ---
>>  tools/testing/selftests/exec/Makefile | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/exec/Makefile b/tools/testing/selftests/exec/Makefile
>> index 4e400eb..d2be580 100644
>> --- a/tools/testing/selftests/exec/Makefile
>> +++ b/tools/testing/selftests/exec/Makefile
>> @@ -1,6 +1,6 @@
>>  CFLAGS = -Wall
>>  BINARIES = execveat
>> -DEPS = execveat.symlink execveat.denatured script subdir
>> +DEPS = execveat.symlink execveat.denatured script subdir Makefile
>>  all: $(BINARIES) $(DEPS)
>>  
>>  subdir:
>>

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

* Re: [PATCH] selftests/exec: Add Makefile to install list since exec test expect it
  2016-06-14 19:15   ` Yannick Brosseau
@ 2016-06-14 19:22     ` Shuah Khan
  0 siblings, 0 replies; 4+ messages in thread
From: Shuah Khan @ 2016-06-14 19:22 UTC (permalink / raw)
  To: Yannick Brosseau, linux-kselftest, linux-kernel; +Cc: kernel-team

On 06/14/2016 01:15 PM, Yannick Brosseau wrote:
> On 06/14/2016 12:09 PM, Shuah Khan wrote:
>> On 06/14/2016 12:45 PM, Yannick Brosseau wrote:
>>> When running the execveat test once installed, the Makefile it not available and the
>>> test fail. Bundling the Makefile file with the installed files fix that.
>> Install is for installing kselftest binaries and run-time dependencies
>> if any on a target system. It is not for being able to build it on the
>> target. Bundling Makefile doesn't make sense.
> The test tries to exec the Makefile file:
>     fail += check_execveat_fail(dot_dfd, "Makefile", 0, EACCES);
> 
> So it's a runtime dependency at the moment.
> We can either change the test to try to open another file or add the
> Makefile

Ah I see why Makefile is necessary. No point in adding a new file.
Please add a comment in the file to indicate that Makefile is a
run-time dependency. Could you also rephrase the change log to make
it clear that Makefile is run-time dependency.

Thanks for catching it.

-- Shuah

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

end of thread, other threads:[~2016-06-14 19:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-14 18:45 [PATCH] selftests/exec: Add Makefile to install list since exec test expect it Yannick Brosseau
2016-06-14 19:09 ` Shuah Khan
2016-06-14 19:15   ` Yannick Brosseau
2016-06-14 19:22     ` Shuah Khan

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).