Skip to contentSkip to conversation

selftests/exec: Add Makefile to install list since exec test expect it

PATCH In review Yannick Brosseau 2 participants 4 messages Jun 14, 2016

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

PATCH 1/1 selftests/exec: Add Makefile to install list since exec test expect it

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.

---
 tools/testing/selftests/exec/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/exec/Makefile +1 -1
index 4e400eb..d2be580 100644
@@ -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:
Signature · 1 line
2.8.1
#1 lore raw
Quoted 2 lines · 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.

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

Quoted 19 lines
---
 tools/testing/selftests/exec/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/exec/Makefile +1 -1
index 4e400eb..d2be580 100644
@@ -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 lore raw
Quoted 6 lines · Shuah Khan
Quoted 2 lines · 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.

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

Quoted 20 lines

-- Shuah

Quoted 18 lines
---
 tools/testing/selftests/exec/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/exec/Makefile +1 -1
index 4e400eb..d2be580 100644
@@ -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:
#3 lore raw
Quoted 7 lines · Yannick Brosseau
Quoted 6 lines · Shuah Khan
Quoted 2 lines · 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.

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.

Quoted 6 lines

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