diff mbox series

selftests/futex: Fix line continuation in Makefile

Message ID 1518024271-12467-1-git-send-email-daniel.diaz@linaro.org
State Accepted
Commit 067b25a5639b10dfdd41ce6b4d4140fe84d0a8e7
Headers show
Series selftests/futex: Fix line continuation in Makefile | expand

Commit Message

Daniel Díaz Feb. 7, 2018, 5:24 p.m. UTC
The Makefile lacks a couple of line continuation backslashes
in an `if' clause, which produces an error while make'ing:

  $ make
  make[1]: Entering directory `/[...]/linux/tools/testing/selftests/futex'
  /bin/sh: -c: line 5: syntax error: unexpected end of file
  make[1]: *** [all] Error 1
  make[1]: Leaving directory `/[...]/linux/tools/testing/selftests/futex'
  make: *** [all] Error 2

Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>

---
 tools/testing/selftests/futex/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
2.7.4

Comments

Shuah Khan Feb. 13, 2018, 9:26 p.m. UTC | #1
On 02/07/2018 10:24 AM, Daniel Díaz wrote:
> The Makefile lacks a couple of line continuation backslashes

> in an `if' clause, which produces an error while make'ing:

> 

>   $ make

>   make[1]: Entering directory `/[...]/linux/tools/testing/selftests/futex'

>   /bin/sh: -c: line 5: syntax error: unexpected end of file

>   make[1]: *** [all] Error 1

>   make[1]: Leaving directory `/[...]/linux/tools/testing/selftests/futex'

>   make: *** [all] Error 2

> 

> Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>

> ---

>  tools/testing/selftests/futex/Makefile | 6 +++---

>  1 file changed, 3 insertions(+), 3 deletions(-)

> 

> diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile

> index cea4adc..a63e845 100644

> --- a/tools/testing/selftests/futex/Makefile

> +++ b/tools/testing/selftests/futex/Makefile

> @@ -12,9 +12,9 @@ all:

>  		BUILD_TARGET=$(OUTPUT)/$$DIR;	\

>  		mkdir $$BUILD_TARGET  -p;	\

>  		make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\

> -		if [ -e $$DIR/$(TEST_PROGS) ]; then

> -			rsync -a $$DIR/$(TEST_PROGS) $$BUILD_TARGET/;

> -		fi

> +		if [ -e $$DIR/$(TEST_PROGS) ]; then \

> +			rsync -a $$DIR/$(TEST_PROGS) $$BUILD_TARGET/; \

> +		fi \

>  	done

>  

>  override define RUN_TESTS

> 


Thanks for the patch. Applied to linux-kselftest fixes for 4.16-rc3

thanks,
-- Shuah
Darren Hart Feb. 14, 2018, 1:33 a.m. UTC | #2
On Tue, Feb 13, 2018 at 02:26:46PM -0700, Shuah Khan wrote:
> On 02/07/2018 10:24 AM, Daniel Díaz wrote:

> > The Makefile lacks a couple of line continuation backslashes

> > in an `if' clause, which produces an error while make'ing:

> > 

> >   $ make

> >   make[1]: Entering directory `/[...]/linux/tools/testing/selftests/futex'

> >   /bin/sh: -c: line 5: syntax error: unexpected end of file

> >   make[1]: *** [all] Error 1

> >   make[1]: Leaving directory `/[...]/linux/tools/testing/selftests/futex'

> >   make: *** [all] Error 2

> > 


What is the failure scenario here? Is this shell specific? What does /bin/sh
point to for you?

> > Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>

> > ---

> >  tools/testing/selftests/futex/Makefile | 6 +++---

> >  1 file changed, 3 insertions(+), 3 deletions(-)

> > 

> > diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile

> > index cea4adc..a63e845 100644

> > --- a/tools/testing/selftests/futex/Makefile

> > +++ b/tools/testing/selftests/futex/Makefile

> > @@ -12,9 +12,9 @@ all:

> >  		BUILD_TARGET=$(OUTPUT)/$$DIR;	\

> >  		mkdir $$BUILD_TARGET  -p;	\

> >  		make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\

> > -		if [ -e $$DIR/$(TEST_PROGS) ]; then

> > -			rsync -a $$DIR/$(TEST_PROGS) $$BUILD_TARGET/;

> > -		fi

> > +		if [ -e $$DIR/$(TEST_PROGS) ]; then \

> > +			rsync -a $$DIR/$(TEST_PROGS) $$BUILD_TARGET/; \

> > +		fi \

> >  	done

> >  

> >  override define RUN_TESTS

> > 

> 

> Thanks for the patch. Applied to linux-kselftest fixes for 4.16-rc3

> 

> thanks,

> -- Shuah

> 


-- 
Darren Hart
VMware Open Source Technology Center
Shuah Khan Feb. 14, 2018, 1:45 a.m. UTC | #3
On 02/13/2018 06:33 PM, Darren Hart wrote:
> On Tue, Feb 13, 2018 at 02:26:46PM -0700, Shuah Khan wrote:

>> On 02/07/2018 10:24 AM, Daniel Díaz wrote:

>>> The Makefile lacks a couple of line continuation backslashes

>>> in an `if' clause, which produces an error while make'ing:

>>>

>>>   $ make

>>>   make[1]: Entering directory `/[...]/linux/tools/testing/selftests/futex'

>>>   /bin/sh: -c: line 5: syntax error: unexpected end of file

>>>   make[1]: *** [all] Error 1

>>>   make[1]: Leaving directory `/[...]/linux/tools/testing/selftests/futex'

>>>   make: *** [all] Error 2

>>>

> 

> What is the failure scenario here? Is this shell specific? What does /bin/sh

> point to for you?


My understanding is that this problem is seen with make versions prior to 4.x.
This specific problem is seen with make version 3.81

I will let Daniel Díaz share details on his environment.

thanks,
-- Shuah
Darren Hart Feb. 14, 2018, 2:03 a.m. UTC | #4
On Tue, Feb 13, 2018 at 06:45:54PM -0700, Shuah Khan wrote:
> On 02/13/2018 06:33 PM, Darren Hart wrote:

> > On Tue, Feb 13, 2018 at 02:26:46PM -0700, Shuah Khan wrote:

> >> On 02/07/2018 10:24 AM, Daniel Díaz wrote:

> >>> The Makefile lacks a couple of line continuation backslashes

> >>> in an `if' clause, which produces an error while make'ing:

> >>>

> >>>   $ make

> >>>   make[1]: Entering directory `/[...]/linux/tools/testing/selftests/futex'

> >>>   /bin/sh: -c: line 5: syntax error: unexpected end of file

> >>>   make[1]: *** [all] Error 1

> >>>   make[1]: Leaving directory `/[...]/linux/tools/testing/selftests/futex'

> >>>   make: *** [all] Error 2

> >>>

> > 

> > What is the failure scenario here? Is this shell specific? What does /bin/sh

> > point to for you?

> 

> My understanding is that this problem is seen with make versions prior to 4.x.

> This specific problem is seen with make version 3.81

> 

> I will let Daniel Díaz share details on his environment.


OK, thanks Shuah. I think this would be important to capture in the commit
message.

-- 
Darren Hart
VMware Open Source Technology Center
Daniel Díaz Feb. 14, 2018, 2:49 p.m. UTC | #5
Hello!


On 13 February 2018 at 20:03, Darren Hart <dvhart@infradead.org> wrote:
> On Tue, Feb 13, 2018 at 06:45:54PM -0700, Shuah Khan wrote:

[...]
>> My understanding is that this problem is seen with make versions prior to 4.x.

>> This specific problem is seen with make version 3.81

>> I will let Daniel Díaz share details on his environment.

>

> OK, thanks Shuah. I think this would be important to capture in the commit

> message.


That's correct -- fails with GNU Make 3.80, 3.81; works with GNU Make
3.82 and the 4.x series. Shuah, if you'd like me to resubmit let me
know.

Thanks and greetings!

Daniel Díaz
daniel.diaz@linaro.org
Shuah Khan Feb. 14, 2018, 3:02 p.m. UTC | #6
On 02/14/2018 07:49 AM, Daniel Díaz Rodríguez wrote:
> Hello!

> 

> 

> On 13 February 2018 at 20:03, Darren Hart <dvhart@infradead.org> wrote:

>> On Tue, Feb 13, 2018 at 06:45:54PM -0700, Shuah Khan wrote:

> [...]

>>> My understanding is that this problem is seen with make versions prior to 4.x.

>>> This specific problem is seen with make version 3.81

>>> I will let Daniel Díaz share details on his environment.

>>

>> OK, thanks Shuah. I think this would be important to capture in the commit

>> message.


Thanks.

> 

> That's correct -- fails with GNU Make 3.80, 3.81; works with GNU Make

> 3.82 and the 4.x series. Shuah, if you'd like me to resubmit let me

> know.

> 


Thanks you both. I will update the commit log with the details on why
this fix is needed. No need to send an updated patch.

thanks,
-- Shuah
diff mbox series

Patch

diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile
index cea4adc..a63e845 100644
--- a/tools/testing/selftests/futex/Makefile
+++ b/tools/testing/selftests/futex/Makefile
@@ -12,9 +12,9 @@  all:
 		BUILD_TARGET=$(OUTPUT)/$$DIR;	\
 		mkdir $$BUILD_TARGET  -p;	\
 		make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
-		if [ -e $$DIR/$(TEST_PROGS) ]; then
-			rsync -a $$DIR/$(TEST_PROGS) $$BUILD_TARGET/;
-		fi
+		if [ -e $$DIR/$(TEST_PROGS) ]; then \
+			rsync -a $$DIR/$(TEST_PROGS) $$BUILD_TARGET/; \
+		fi \
 	done
 
 override define RUN_TESTS