Skip to contentSkip to conversation

selftests/futex: Fix makefile dependencies

PATCH In review Stafford Horne 3 participants 8 messages Jan 6, 2017 – Jan 11, 2017

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

PATCH 1/1 selftests/futex: Fix makefile dependencies

I am working on doing selftests for openrisc and found issues with the futex test is not building after changes to the tests source.

This issue is that the TARGETS variable used in the futex Makefile is also used by the selftests Makefile, so when building from toplevel the TARGETS variable is clobbered and nothing gets built. Changed the variable name to get around that.

Also, the futex makefile did not contain dependencies for all headers, so if we make changes to logging.h rebuild will not happen. Add headers to fix it up.

---
 tools/testing/selftests/futex/functional/Makefile | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
tools/testing/selftests/futex/functional/Makefile +9 -6
index 9d6b75e..1546cbd 100644
@@ -2,8 +2,11 @@ INCLUDES := -I../include -I../../
 CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES)
 LDFLAGS := $(LDFLAGS) -pthread -lrt
 
-HEADERS := ../include/futextest.h
-TARGETS := \
+HEADERS := \
+	../include/futextest.h \
+	../include/atomic.h \
+	../include/logging.h
+TEST_TARGETS := \
 	futex_wait_timeout \
 	futex_wait_wouldblock \
 	futex_requeue_pi \
@@ -12,14 +15,14 @@ TARGETS := \
 	futex_wait_uninitialized_heap \
 	futex_wait_private_mapped_file
 
-TEST_PROGS := $(TARGETS) run.sh
+TEST_PROGS := $(TEST_TARGETS) run.sh
 
 .PHONY: all clean
-all: $(TARGETS)
+all: $(TEST_TARGETS)
 
-$(TARGETS): $(HEADERS)
+$(TEST_TARGETS): $(HEADERS)
 
 include ../../lib.mk
 
 clean:
-	rm -f $(TARGETS)
+	rm -f $(TEST_TARGETS)
Signature · 1 line
2.9.3
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Stafford Horne

I am working on doing selftests for openrisc and found issues with the futex test is not building after changes to the tests source.

This issue is that the TARGETS variable used in the futex Makefile is also used by the selftests Makefile, so when building from toplevel the TARGETS variable is clobbered and nothing gets built. Changed the variable name to get around that.

Quoted 5 lines

Also, the futex makefile did not contain dependencies for all headers, so if we make changes to logging.h rebuild will not happen. Add headers to fix it up.

Thanks for catching this and the fix.

+Shuah Khan

Note: This appears also to be a problem for intel_pstate/Makefile

Quoted 45 lines
---
 tools/testing/selftests/futex/functional/Makefile | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
tools/testing/selftests/futex/functional/Makefile +9 -6
index 9d6b75e..1546cbd 100644
@@ -2,8 +2,11 @@ INCLUDES := -I../include -I../../
 CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES)
 LDFLAGS := $(LDFLAGS) -pthread -lrt
 
-HEADERS := ../include/futextest.h
-TARGETS := \
+HEADERS := \
+	../include/futextest.h \
+	../include/atomic.h \
+	../include/logging.h
+TEST_TARGETS := \
 	futex_wait_timeout \
 	futex_wait_wouldblock \
 	futex_requeue_pi \
@@ -12,14 +15,14 @@ TARGETS := \
 	futex_wait_uninitialized_heap \
 	futex_wait_private_mapped_file
 
-TEST_PROGS := $(TARGETS) run.sh
+TEST_PROGS := $(TEST_TARGETS) run.sh
 
 .PHONY: all clean
-all: $(TARGETS)
+all: $(TEST_TARGETS)
 
-$(TARGETS): $(HEADERS)
+$(TEST_TARGETS): $(HEADERS)
 
 include ../../lib.mk
 
 clean:
-	rm -f $(TARGETS)
+	rm -f $(TEST_TARGETS)
Signature · 1 line
2.9.3
Signature · 2 lines
Darren Hart
Intel Open Source Technology Center
reviewer
#2 lore raw
Quoted 13 lines · Darren Hart
Quoted 12 lines · Stafford Horne

I am working on doing selftests for openrisc and found issues with the futex test is not building after changes to the tests source.

This issue is that the TARGETS variable used in the futex Makefile is also used by the selftests Makefile, so when building from toplevel the TARGETS variable is clobbered and nothing gets built. Changed the variable name to get around that.

Also, the futex makefile did not contain dependencies for all headers, so if we make changes to logging.h rebuild will not happen. Add headers to fix it up.

Quoted 7 lines
Quoted 1 line

Thanks for catching this and the fix.

+Shuah Khan

Note: This appears also to be a problem for intel_pstate/Makefile

Or, it would be if intel_pstate was listed in selftests/Makefile :-)

Signature · 2 lines
Darren Hart
Intel Open Source Technology Center
#3 lore raw
Quoted 16 lines · Darren Hart
Quoted 15 lines · Darren Hart
Quoted 13 lines · Stafford Horne

I am working on doing selftests for openrisc and found issues with the futex test is not building after changes to the tests source.

This issue is that the TARGETS variable used in the futex Makefile is also used by the selftests Makefile, so when building from toplevel the TARGETS variable is clobbered and nothing gets built. Changed the variable name to get around that.

Also, the futex makefile did not contain dependencies for all headers, so if we make changes to logging.h rebuild will not happen. Add headers to fix it up.

Quoted 7 lines
Quoted 5 lines

Thanks for catching this and the fix.

+Shuah Khan

Note: This appears also to be a problem for intel_pstate/Makefile

Or, it would be if intel_pstate was listed in selftests/Makefile :-)

Right, thanks for having a look. I actually have a small patch to also add <stdio.h> to logging.h. If you have not already fixed the intel_pstate test I'll send them all together.

Although I am working on testing openrisc, doing a intel_pstate test on my box shouldnt be much of a problem :)

-Stafford

reviewer
#4 lore raw
Quoted 21 lines · Stafford Horne
Quoted 20 lines · Darren Hart
Quoted 19 lines · Darren Hart
Quoted 8 lines · Stafford Horne

I am working on doing selftests for openrisc and found issues with the futex test is not building after changes to the tests source.

This issue is that the TARGETS variable used in the futex Makefile is also used by the selftests Makefile, so when building from toplevel the TARGETS variable is clobbered and nothing gets built. Changed the variable name to get around that.

Quoted 5 lines

Also, the futex makefile did not contain dependencies for all headers, so if we make changes to logging.h rebuild will not happen. Add headers to fix it up.

Thanks for catching this and the fix.

+Shuah Khan

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Note: This appears also to be a problem for intel_pstate/Makefile

Or, it would be if intel_pstate was listed in selftests/Makefile :-)

Right, thanks for having a look. I actually have a small patch to also add <stdio.h> to logging.h. If you have not already fixed the intel_pstate test I'll send them all together.

Please do, thanks!

Signature · 2 lines
Darren Hart
Intel Open Source Technology Center
#5 lore raw
Quoted 24 lines · Darren Hart
Quoted 23 lines · Stafford Horne
Quoted 22 lines · Darren Hart
Quoted 20 lines · Darren Hart
Quoted 8 lines · Stafford Horne

I am working on doing selftests for openrisc and found issues with the futex test is not building after changes to the tests source.

This issue is that the TARGETS variable used in the futex Makefile is also used by the selftests Makefile, so when building from toplevel the TARGETS variable is clobbered and nothing gets built. Changed the variable name to get around that.

Quoted 5 lines

Also, the futex makefile did not contain dependencies for all headers, so if we make changes to logging.h rebuild will not happen. Add headers to fix it up.

Thanks for catching this and the fix.

+Shuah Khan

Note: This appears also to be a problem for intel_pstate/Makefile

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Or, it would be if intel_pstate was listed in selftests/Makefile :-)

Right, thanks for having a look. I actually have a small patch to also add <stdio.h> to logging.h. If you have not already fixed the intel_pstate test I'll send them all together.

Please do, thanks!

Hello,
Actually I just had a look at Shuah's linux-kselftest repo on kernel.org. It looks like Bamvor Jian has actually fixed a lot of these issues on the next branch.

I will see what is missing if anything.

-Stafford

maintainer
#6 lore raw
Quoted 33 lines · Stafford Horne
Quoted 24 lines · Darren Hart
Quoted 23 lines · Stafford Horne
Quoted 22 lines · Darren Hart
Quoted 20 lines · Darren Hart
Quoted 8 lines · Stafford Horne

I am working on doing selftests for openrisc and found issues with the futex test is not building after changes to the tests source.

This issue is that the TARGETS variable used in the futex Makefile is also used by the selftests Makefile, so when building from toplevel the TARGETS variable is clobbered and nothing gets built. Changed the variable name to get around that.

Quoted 5 lines

Also, the futex makefile did not contain dependencies for all headers, so if we make changes to logging.h rebuild will not happen. Add headers to fix it up.

Thanks for catching this and the fix.

+Shuah Khan

Note: This appears also to be a problem for intel_pstate/Makefile

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Or, it would be if intel_pstate was listed in selftests/Makefile :-)

Right, thanks for having a look. I actually have a small patch to also add <stdio.h> to logging.h. If you have not already fixed the intel_pstate test I'll send them all together.

Please do, thanks!

Quoted 10 lines

Hello,
Actually I just had a look at Shuah's linux-kselftest repo on kernel.org. It looks like Bamvor Jian has actually fixed a lot of these issues on the next branch.

I will see what is missing if anything.

-Stafford

Hi Stafford,

Thanks for looking into the issues. Yes Bemovar fixed several issues. Could you please send me the patches you alre

If you think [PATCH] selftests/futex: Fix makefile dependencies should be pulled in, please send it to me. I just Darren's response, don't have the original patch email in my Inbox.

thanks,
-- Shuah

#7 lore raw
Quoted 45 lines · Shuah Khan
Quoted 33 lines · Stafford Horne
Quoted 24 lines · Darren Hart
Quoted 23 lines · Stafford Horne
Quoted 22 lines · Darren Hart
Quoted 20 lines · Darren Hart
Quoted 8 lines · Stafford Horne

I am working on doing selftests for openrisc and found issues with the futex test is not building after changes to the tests source.

This issue is that the TARGETS variable used in the futex Makefile is also used by the selftests Makefile, so when building from toplevel the TARGETS variable is clobbered and nothing gets built. Changed the variable name to get around that.

Quoted 5 lines

Also, the futex makefile did not contain dependencies for all headers, so if we make changes to logging.h rebuild will not happen. Add headers to fix it up.

Thanks for catching this and the fix.

+Shuah Khan

Note: This appears also to be a problem for intel_pstate/Makefile

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Or, it would be if intel_pstate was listed in selftests/Makefile :-)

Right, thanks for having a look. I actually have a small patch to also add <stdio.h> to logging.h. If you have not already fixed the intel_pstate test I'll send them all together.

Please do, thanks!

Quoted 10 lines

Hello,
Actually I just had a look at Shuah's linux-kselftest repo on kernel.org. It looks like Bamvor Jian has actually fixed a lot of these issues on the next branch.

I will see what is missing if anything.

-Stafford

Quoted 8 lines

Hi Stafford,

Thanks for looking into the issues. Yes Bemovar fixed several issues. Could you please send me the patches you alre

If you think [PATCH] selftests/futex: Fix makefile dependencies should be pulled in, please send it to me. I just Darren's response, don't have the original patch email in my Inbox.

Hello Shuah,

There was a conflict with my patch and Bamvor's. As you make have seen, I have resolved those conflicts and sent a few more patches in new series.

2/6 is what has become of the original patch that Darren reviewed. I didn't keep Reviewed-by since its completely different now, I will wait for review of the others.

-Stafford