selftests: ptrace, kcmp, efivars build failure fixes
cover selftests: ptrace, kcmp, efivars build failure fixes
ptrace, efivars, and kcmp Makefiles don't have explicit build rule. As a result, build fails when make is run from top level Makefile target kselftest. Without the explicit rule, make works only when it is run in the current directory or from selftests directory. Fxing the problems by adding an explicit build rule to fix the problem.
Shuah Khan (3):
selftests: ptrace build fails when invoked from kselftest target
selftests: efivars build fails when invoked from kselftest target
selftests: kcmp build fails when invoked from kselftest target
tools/testing/selftests/efivarfs/Makefile | 2 ++ tools/testing/selftests/kcmp/Makefile | 5 +++-- tools/testing/selftests/ptrace/Makefile | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-)
Signature · 1 line
2.1.0
PATCH 1/3 selftests: ptrace build fails when invoked from kselftest target
ptrace Makefile doesn't have an explicit build rule. As a result, ptrace build fails, when it is run from top level Makefile target kselftest. Without the explicit rule, make works only when it is run in the current directory or from selftests directory. Add an explicit build rule to fix the problem.
--- tools/testing/selftests/ptrace/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
tools/testing/selftests/ptrace/Makefile +3 -2
@@ -1,7 +1,8 @@ +CC := $(CROSS_COMPILE)$(CC) CFLAGS += -iquote../../../../include/uapi -Wall -peeksiginfo: peeksiginfo.c -all: peeksiginfo +all: + $(CC) $(CFLAGS) peeksiginfo.c -o peeksiginfo clean: rm -f peeksiginfo
Signature · 1 line
2.1.0
PATCH 2/3 selftests: efivars build fails when invoked from kselftest target
In reply to Shuah Khanefivars Makefile doesn't have an explicit build rule. As a result, efivars build fails, when it is run from top level Makefile target kselftest. Without the explicit rule, make works only when it is run in the current directory or from selftests directory. Add an explicit build rule to fix the problem.
--- tools/testing/selftests/efivarfs/Makefile | 2 ++ 1 file changed, 2 insertions(+)
tools/testing/selftests/efivarfs/Makefile +2 -0
@@ -4,6 +4,8 @@ CFLAGS = -Wall test_objs = open-unlink create-read all: $(test_objs) +%: %.c + $(CC) $(CFLAGS) -o $@ $^ run_tests: all @/bin/bash ./efivarfs.sh || echo "efivarfs selftests: [FAIL]"
Signature · 1 line
2.1.0
PATCH 3/3 selftests: kcmp build fails when invoked from kselftest target
In reply to Shuah Khankcmp Makefile doesn't have an explicit build rule. As a result, kcmp build fails, when it is run from top level Makefile target kselftest. Without the explicit rule, make works only when it is run in the current directory or from selftests directory. Add an explicit build rule to fix the problem. In addition, build fails as it can't find kcmp.h. Fix it by passing CFLAGS.
--- tools/testing/selftests/kcmp/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
tools/testing/selftests/kcmp/Makefile +3 -2
@@ -1,7 +1,8 @@ CC := $(CROSS_COMPILE)$(CC) -CFLAGS += -I../../../../usr/include/ +CFLAGS += -I../../../../include/uapi -I../../../../usr/include/ -all: kcmp_test +all: + $(CC) $(CFLAGS) kcmp_test.c -o kcmp_test run_tests: all @./kcmp_test || echo "kcmp_test: [FAIL]"
Signature · 1 line
2.1.0
Re: [PATCH 3/3] selftests: kcmp build fails when invoked from kselftest target
Quoted 17 lines · Shuah Khan
kcmp
Makefiledoesn't have an explicit build rule. As a result, kcmp build fails, when it is run from top levelMakefiletarget kselftest. Without the explicit rule, make works only when it is run in the current directory or from selftests directory. Add an explicit build rule to fix the problem. In addition, build fails as it can't findkcmp.h. Fix it by passing CFLAGS.Signed-off-by Shuah Khan <[email protected]>--- tools/testing/selftests/kcmp/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)tools/testing/selftests/kcmp/Makefile +0
-0
tools/testing/selftests/kcmp/Makefile line 8
Quoted 10 lines
tools/testing/selftests/kcmp/Makefile +3
-2@@ -1,7 +1,8 @@ CC := $(CROSS_COMPILE)$(CC) -CFLAGS += -I../../../../usr/include/ +CFLAGS += -I../../../../include/uapi -I../../../../usr/include/ -all: kcmp_test +all: + $(CC) $(CFLAGS) kcmp_test.c -o kcmp_test run_tests: all @./kcmp_test || echo "kcmp_test: [FAIL]"
Ho Shuah! Thanks for looking into it. I've a small question -- why kcmp_test prerequsite is dropped? As to me it should remain here, except explicit build rule added.
Re: [PATCH 3/3] selftests: kcmp build fails when invoked from kselftest target
Quoted 26 lines · Cyrill Gorcunov
Quoted 25 lines · Shuah Khan
kcmp
Makefiledoesn't have an explicit build rule. As a result, kcmp build fails, when it is run from top levelMakefiletarget kselftest. Without the explicit rule, make works only when it is run in the current directory or from selftests directory. Add an explicit build rule to fix the problem. In addition, build fails as it can't findkcmp.h. Fix it by passing CFLAGS.Signed-off-by Shuah Khan <[email protected]>--- tools/testing/selftests/kcmp/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)tools/testing/selftests/kcmp/Makefile +3
-2@@ -1,7 +1,8 @@ CC := $(CROSS_COMPILE)$(CC) -CFLAGS += -I../../../../usr/include/ +CFLAGS += -I../../../../include/uapi -I../../../../usr/include/ -all: kcmp_test +all: + $(CC) $(CFLAGS) kcmp_test.c -o kcmp_test
Quoted 7 lines
tools/testing/selftests/kcmp/Makefile line 8
Quoted 2 lines
tools/testing/selftests/kcmp/Makefile +0
-0run_tests: all @./kcmp_test || echo "kcmp_test: [FAIL]"Ho Shuah! Thanks for looking into it. I've a small question -- why
kcmp_testprerequsite is dropped? As to me it should remain here, except explicit build rule added.
Are you looking for something like this:
all: kcmp_test
kcmp_test:
$(CC) $(CFLAGS) kcmp_test.c -o kcmp_test
I just simplified it and removed the prerequsite.
If you prefer, I can make the change to keep the
prereq.
thanks,
-- Shuah
Signature · 5 lines
Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Valley) [email protected] | (970) 217-8978
Re: [PATCH 3/3] selftests: kcmp build fails when invoked from kselftest target
Quoted 11 lines · Shuah Khan
Are you looking for something like this:
all:
kcmp_test
kcmp_test:$(CC) $(CFLAGS) kcmp_test.c -o kcmp_testI just simplified it and removed the prerequsite.
If you prefer, I can make the change to keep the
prereq.
Yes please, and you may use internal make var $@ as well
kcmp_test:
$(CC) $(CFLAGS) kcmp_test.c -o $@
Quoted 12 lines · Shuah Khan
ptrace, efivars, and kcmp Makefiles don't have explicit build rule. As a result, build fails when make is run from top level
Makefiletarget kselftest. Without the explicit rule, make works only when it is run in the current directory or from selftests directory. Fxing the problems by adding an explicit build rule to fix the problem.Shuah Khan (3):
selftests: ptrace build fails when invoked from kselftest target
selftests: efivars build fails when invoked from kselftest target
selftests: kcmp build fails when invoked from kselftest target
Quoted 4 lines
tools/testing/selftests/efivarfs/Makefile | 2 ++ tools/testing/selftests/kcmp/Makefile | 5 +++-- tools/testing/selftests/ptrace/Makefile | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-)
What? No. This is the bug my patch to filter the make flags fixes.
cheers
Quoted 13 lines · Michael Ellerman
Quoted 12 lines · Shuah Khan
ptrace, efivars, and kcmp Makefiles don't have explicit build rule. As a result, build fails when make is run from top level
Makefiletarget kselftest. Without the explicit rule, make works only when it is run in the current directory or from selftests directory. Fxing the problems by adding an explicit build rule to fix the problem.Shuah Khan (3):
selftests: ptrace build fails when invoked from kselftest target
selftests: efivars build fails when invoked from kselftest target
selftests: kcmp build fails when invoked from kselftest target
Quoted 10 lines
Quoted 4 lines
tools/testing/selftests/efivarfs/Makefile | 2 ++ tools/testing/selftests/kcmp/Makefile | 5 +++-- tools/testing/selftests/ptrace/Makefile | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-)What? No. This is the bug my patch to filter the make flags fixes.
cheers
Michael,
Did you see my email from yesterday on how your patch introduced more problems. Can you please make sure the patches you send work and don't introduce problems. I am having this issue with a lot of your patches.
thanks,
-- Shuah
Signature · 5 lines
Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Valley) [email protected] | (970) 217-8978
Quoted 25 lines · Shuah Khan
Quoted 13 lines · Michael Ellerman
Quoted 12 lines · Shuah Khan
ptrace, efivars, and kcmp Makefiles don't have explicit build rule. As a result, build fails when make is run from top level
Makefiletarget kselftest. Without the explicit rule, make works only when it is run in the current directory or from selftests directory. Fxing the problems by adding an explicit build rule to fix the problem.Shuah Khan (3):
selftests: ptrace build fails when invoked from kselftest target
selftests: efivars build fails when invoked from kselftest target
selftests: kcmp build fails when invoked from kselftest targetQuoted 10 lines
Quoted 4 lines
tools/testing/selftests/efivarfs/Makefile | 2 ++ tools/testing/selftests/kcmp/Makefile | 5 +++-- tools/testing/selftests/ptrace/Makefile | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-)What? No. This is the bug my patch to filter the make flags fixes.
cheers
Quoted 7 lines
Michael,
Did you see my email from yesterday on how your patch introduced more problems. Can you please make sure the patches you send work and don't introduce problems. I am having this issue with a lot of your patches.
btw your patch doesn't fix the header file include problem. I don't see any reason why individual Makefile shouldn't address this problem.
thanks,
-- Shuah
Signature · 5 lines
Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Valley) [email protected] | (970) 217-8978