Skip to contentSkip to conversation

selftests/futex: Fix line continuation in Makefile

PATCH In review Daniel Díaz 3 participants 7 messages Feb 7, 2018 – Feb 14, 2018

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

PATCH 1/1 selftests/futex: Fix line continuation in Makefile

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 at linaro.org>
---
 tools/testing/selftests/futex/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/testing/selftests/futex/Makefile +3 -3
index cea4adc..a63e845 100644
@@ -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
Signature · 6 lines
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw
Quoted 23 lines · Daniel Díaz

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 at linaro.org>
---
 tools/testing/selftests/futex/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/testing/selftests/futex/Makefile +0 -0
index cea4adc..a63e845 100644
@@ -12,9 +12,9 @@ all:
 		BUILD_TARGET=$(OUTPUT)/$$DIR;	\
 		mkdir $$BUILD_TARGET  -p;	\

tools/testing/selftests/futex/Makefile all: · line 20

Quoted 10 lines
tools/testing/selftests/futex/Makefile +3 -3
 		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
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

reviewer
#2 lore raw
Quoted 11 lines · Shuah Khan
Quoted 10 lines · Daniel Díaz

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?

Quoted 29 lines
Quoted 13 lines
Signed-off-by Daniel Díaz <daniel.diaz at linaro.org>
---
 tools/testing/selftests/futex/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/testing/selftests/futex/Makefile +0 -0
index cea4adc..a63e845 100644
@@ -12,9 +12,9 @@ all:
 		BUILD_TARGET=$(OUTPUT)/$$DIR;	\
 		mkdir $$BUILD_TARGET  -p;	\

tools/testing/selftests/futex/Makefile all: · line 20

Quoted 10 lines
tools/testing/selftests/futex/Makefile +3 -3
 		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

Signature · 6 lines
Darren Hart
VMware Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw
Quoted 13 lines · Darren Hart
Quoted 11 lines · Shuah Khan
Quoted 10 lines · Daniel Díaz

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
Quoted 2 lines

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

reviewer
#4 lore raw
Quoted 14 lines · Shuah Khan
Quoted 13 lines · Darren Hart
Quoted 11 lines · Shuah Khan
Quoted 10 lines · Daniel Díaz

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
Quoted 7 lines
Quoted 2 lines

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.

Signature · 6 lines
Darren Hart
VMware Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw

Hello!

Quoted 1 line · Darren Hart

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

[...]

Quoted 6 lines
Quoted 3 lines

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 at linaro.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw
Quoted 12 lines · Daniel Díaz Rodríguez

Hello!

Quoted 1 line · Darren Hart

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

[...]

Quoted 6 lines
Quoted 3 lines

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.

Quoted 5 lines

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html