Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1552524 > unrolled thread

[PATCH] selftests/futex: Fix makefile dependencies

Started byStafford Horne <shorne@gmail.com>
First post2017-01-06 05:30 +0100
Last post2017-01-10 23:20 +0100
Articles 8 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] selftests/futex: Fix makefile dependencies Stafford Horne <shorne@gmail.com> - 2017-01-06 05:30 +0100
    Re: [PATCH] selftests/futex: Fix makefile dependencies Darren Hart <dvhart@infradead.org> - 2017-01-10 23:20 +0100
      Re: [PATCH] selftests/futex: Fix makefile dependencies Stafford Horne <shorne@gmail.com> - 2017-01-11 05:40 +0100
        Re: [PATCH] selftests/futex: Fix makefile dependencies Darren Hart <dvhart@infradead.org> - 2017-01-11 09:10 +0100
          Re: [PATCH] selftests/futex: Fix makefile dependencies Stafford Horne <shorne@gmail.com> - 2017-01-11 09:50 +0100
            Re: [PATCH] selftests/futex: Fix makefile dependencies Shuah Khan <shuah@kernel.org> - 2017-01-11 15:50 +0100
              Re: [PATCH] selftests/futex: Fix makefile dependencies Stafford Horne <shorne@gmail.com> - 2017-01-11 16:40 +0100
    Re: [PATCH] selftests/futex: Fix makefile dependencies Darren Hart <dvhart@infradead.org> - 2017-01-10 23:20 +0100

#1552524 — [PATCH] selftests/futex: Fix makefile dependencies

FromStafford Horne <shorne@gmail.com>
Date2017-01-06 05:30 +0100
Subject[PATCH] selftests/futex: Fix makefile dependencies
Message-ID<sWuk9-4DR-1@gated-at.bofh.it>
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.

Signed-off-by: Stafford Horne <shorne@gmail.com>
---
 tools/testing/selftests/futex/functional/Makefile | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile
index 9d6b75e..1546cbd 100644
--- a/tools/testing/selftests/futex/functional/Makefile
+++ b/tools/testing/selftests/futex/functional/Makefile
@@ -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)
-- 
2.9.3

[toc] | [next] | [standalone]


#1555969

FromDarren Hart <dvhart@infradead.org>
Date2017-01-10 23:20 +0100
Message-ID<sYcVP-70a-7@gated-at.bofh.it>
In reply to#1552524
On Tue, Jan 10, 2017 at 02:10:42PM -0800, Darren Hart wrote:
> On Fri, Jan 06, 2017 at 01:18:39PM +0900, Stafford Horne wrote:
> > 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.
> > 
> > Signed-off-by: Stafford Horne <shorne@gmail.com>
> 
> 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 :-)
-- 
Darren Hart
Intel Open Source Technology Center

[toc] | [prev] | [next] | [standalone]


#1556199

FromStafford Horne <shorne@gmail.com>
Date2017-01-11 05:40 +0100
Message-ID<sYiRA-29R-9@gated-at.bofh.it>
In reply to#1555969
On Tue, Jan 10, 2017 at 02:17:18PM -0800, Darren Hart wrote:
> On Tue, Jan 10, 2017 at 02:10:42PM -0800, Darren Hart wrote:
> > On Fri, Jan 06, 2017 at 01:18:39PM +0900, Stafford Horne wrote:
> > > 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.
> > > 
> > > Signed-off-by: Stafford Horne <shorne@gmail.com>
> > 
> > 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

[toc] | [prev] | [next] | [standalone]


#1556262

FromDarren Hart <dvhart@infradead.org>
Date2017-01-11 09:10 +0100
Message-ID<sYm8O-4tG-17@gated-at.bofh.it>
In reply to#1556199
On Wed, Jan 11, 2017 at 01:37:19PM +0900, Stafford Horne wrote:
> On Tue, Jan 10, 2017 at 02:17:18PM -0800, Darren Hart wrote:
> > On Tue, Jan 10, 2017 at 02:10:42PM -0800, Darren Hart wrote:
> > > On Fri, Jan 06, 2017 at 01:18:39PM +0900, Stafford Horne wrote:
> > > > 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.
> > > > 
> > > > Signed-off-by: Stafford Horne <shorne@gmail.com>
> > > 
> > > 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.

Please do, thanks!


-- 
Darren Hart
Intel Open Source Technology Center

[toc] | [prev] | [next] | [standalone]


#1556284

FromStafford Horne <shorne@gmail.com>
Date2017-01-11 09:50 +0100
Message-ID<sYmLv-4GO-3@gated-at.bofh.it>
In reply to#1556262
On Wed, Jan 11, 2017 at 12:07:55AM -0800, Darren Hart wrote:
> On Wed, Jan 11, 2017 at 01:37:19PM +0900, Stafford Horne wrote:
> > On Tue, Jan 10, 2017 at 02:17:18PM -0800, Darren Hart wrote:
> > > On Tue, Jan 10, 2017 at 02:10:42PM -0800, Darren Hart wrote:
> > > > On Fri, Jan 06, 2017 at 01:18:39PM +0900, Stafford Horne wrote:
> > > > > 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.
> > > > > 
> > > > > Signed-off-by: Stafford Horne <shorne@gmail.com>
> > > > 
> > > > 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.
> 
> 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

[toc] | [prev] | [next] | [standalone]


#1556548

FromShuah Khan <shuah@kernel.org>
Date2017-01-11 15:50 +0100
Message-ID<sYsnU-86a-27@gated-at.bofh.it>
In reply to#1556284
On 01/11/2017 01:48 AM, Stafford Horne wrote:
> On Wed, Jan 11, 2017 at 12:07:55AM -0800, Darren Hart wrote:
>> On Wed, Jan 11, 2017 at 01:37:19PM +0900, Stafford Horne wrote:
>>> On Tue, Jan 10, 2017 at 02:17:18PM -0800, Darren Hart wrote:
>>>> On Tue, Jan 10, 2017 at 02:10:42PM -0800, Darren Hart wrote:
>>>>> On Fri, Jan 06, 2017 at 01:18:39PM +0900, Stafford Horne wrote:
>>>>>> 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.
>>>>>>
>>>>>> Signed-off-by: Stafford Horne <shorne@gmail.com>
>>>>>
>>>>> 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.
>>
>> 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
> 
> 

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

[toc] | [prev] | [next] | [standalone]


#1556638

FromStafford Horne <shorne@gmail.com>
Date2017-01-11 16:40 +0100
Message-ID<sYtai-an-41@gated-at.bofh.it>
In reply to#1556548
On Wed, Jan 11, 2017 at 07:41:07AM -0700, Shuah Khan wrote:
> On 01/11/2017 01:48 AM, Stafford Horne wrote:
> > On Wed, Jan 11, 2017 at 12:07:55AM -0800, Darren Hart wrote:
> >> On Wed, Jan 11, 2017 at 01:37:19PM +0900, Stafford Horne wrote:
> >>> On Tue, Jan 10, 2017 at 02:17:18PM -0800, Darren Hart wrote:
> >>>> On Tue, Jan 10, 2017 at 02:10:42PM -0800, Darren Hart wrote:
> >>>>> On Fri, Jan 06, 2017 at 01:18:39PM +0900, Stafford Horne wrote:
> >>>>>> 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.
> >>>>>>
> >>>>>> Signed-off-by: Stafford Horne <shorne@gmail.com>
> >>>>>
> >>>>> 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.
> >>
> >> 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
> > 
> > 
> 
> 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

[toc] | [prev] | [next] | [standalone]


#1555974

FromDarren Hart <dvhart@infradead.org>
Date2017-01-10 23:20 +0100
Message-ID<sYcVP-70a-9@gated-at.bofh.it>
In reply to#1552524
On Fri, Jan 06, 2017 at 01:18:39PM +0900, Stafford Horne wrote:
> 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.
> 
> Signed-off-by: Stafford Horne <shorne@gmail.com>

Thanks for catching this and the fix.

+Shuah Khan

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

Reviewed-by: Darren Hart <dvhart@linux.intel.com>

> ---
>  tools/testing/selftests/futex/functional/Makefile | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile
> index 9d6b75e..1546cbd 100644
> --- a/tools/testing/selftests/futex/functional/Makefile
> +++ b/tools/testing/selftests/futex/functional/Makefile
> @@ -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)
> -- 
> 2.9.3
> 
> 

-- 
Darren Hart
Intel Open Source Technology Center

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web