selftests/android: Fix line continuation in Makefile
PATCH 1/1 selftests/android: Fix line continuation in Makefile
The Makefile lacks a couple of line continuation backslashes in an if' clause, which can make the subsequent rsync command go awry over the whole filesystem (rsync -a / /`).
/bin/sh: -c: line 5: syntax error: unexpected end of file make[1]: [all] Error 1 (ignored)
TEST=$DIR"_test.sh"; \
if [ -e $DIR/$TEST ]; then
/bin/sh: -c: line 2: syntax error: unexpected end of file
make[1]: [all] Error 1 (ignored)
rsync -a $DIR/$TEST $BUILD_TARGET/;
[...a myriad of:]
[ rsync: readlink_stat("...") failed: Permission denied (13)]
[ skipping non-regular file "..."]
[ rsync: opendir "..." failed: Permission denied (13)] [and many other errors...]
fi
make[1]: fi: Command not found
make[1]: [all] Error 127 (ignored)
done
make[1]: done: Command not found
make[1]: [all] Error 127 (ignored)
--- tools/testing/selftests/android/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tools/testing/selftests/android/Makefile +4 -4
@@ -11,11 +11,11 @@ all: BUILD_TARGET=$(OUTPUT)/$$DIR; \ mkdir $$BUILD_TARGET -p; \ make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ - #SUBDIR test prog name should be in the form: SUBDIR_test.sh + #SUBDIR test prog name should be in the form: SUBDIR_test.sh \ TEST=$$DIR"_test.sh"; \ - if [ -e $$DIR/$$TEST ]; then - rsync -a $$DIR/$$TEST $$BUILD_TARGET/; - fi + if [ -e $$DIR/$$TEST ]; then \ + rsync -a $$DIR/$$TEST $$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
Quoted 36 lines · Daniel Díaz
The
Makefilelacks a couple of line continuation backslashes in anif' clause, which can make the subsequent rsync command go awry over the whole filesystem (rsync -a / /`).
/bin/sh: -c: line 5: syntax error: unexpected end of file make[1]: [all] Error 1 (ignored)TEST=$DIR"_test.sh"; \ if [ -e $DIR/$TEST ]; then /bin/sh: -c: line 2: syntax error: unexpected end of file make[1]: [all] Error 1 (ignored) rsync -a $DIR/$TEST $BUILD_TARGET/; [...a myriad of:] [ rsync: readlink_stat("...") failed: Permission denied (13)] [ skipping non-regular file "..."] [ rsync: opendir "..." failed: Permission denied (13)][and many other errors...]
fi
make[1]: fi: Command not found
make[1]: [all] Error 127 (ignored)
done
make[1]: done: Command not found
make[1]: [all] Error 127 (ignored)Signed-off-by Daniel Díaz <daniel.diaz at linaro.org>--- tools/testing/selftests/android/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)tools/testing/selftests/android/Makefile +0
-0@@ -11,11 +11,11 @@ all: BUILD_TARGET=$(OUTPUT)/$$DIR; \ mkdir $$BUILD_TARGET -p; \ make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
tools/testing/selftests/android/Makefile all: · line 19
Quoted 10 lines
tools/testing/selftests/android/Makefile +4
-4- #SUBDIR test prog name should be in the form: SUBDIR_test.sh + #SUBDIR test prog name should be in the form: SUBDIR_test.sh \ TEST=$$DIR"_test.sh"; \ - if [ -e $$DIR/$$TEST ]; then - rsync -a $$DIR/$$TEST $$BUILD_TARGET/; - fi + if [ -e $$DIR/$$TEST ]; then \ + rsync -a $$DIR/$$TEST $$BUILD_TARGET/; \ + fi \ done
Thanks for your patch.
However, I have copied this Makefile from tools/testing/selftests/futex/Makefile before modifying it. If there is a problem with backslash then the same problem must be there in futex Makefile as well.
Can you compare these 2 Makefile and see if there is any problem.
Also is it because of make version ?
Can you check your make version ?
Thank You!
Pintu
Quoted 5 lines
tools/testing/selftests/android/Makefile +0
-1override define RUN_TESTS --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
Hello!
On 7 February 2018 at 00:01, Pintu Kumar <pintu.ping at gmail.com> wrote:
[...]
Quoted 5 lines
Thanks for your patch.
However, I have copied thisMakefilefromtools/testing/selftests/futex/Makefilebefore modifying it. If there is a problem with backslash then the same problem must be there in futexMakefileas well.
There is. Patch coming.
[...]
Quoted 2 lines
Also is it because of make version ?
Can you check your make version ?
It's make 3.81.
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
Quoted 5 lines · Daniel Díaz Rodríguez
Hello!
On 7 February 2018 at 00:01, Pintu Kumar <pintu.ping at gmail.com> wrote:
[...]
Quoted 7 lines
Quoted 5 lines
Thanks for your patch.
However, I have copied thisMakefilefromtools/testing/selftests/futex/Makefilebefore modifying it. If there is a problem with backslash then the same problem must be there in futexMakefileas well.There is. Patch coming.
OK
Quoted 7 lines
[...]
Quoted 2 lines
Also is it because of make version ?
Can you check your make version ?It's make 3.81.
My make version was 4.1.
So I did not face any problem. I guess this problem is fixed from make version 4.x on wards.
However, for backward compatibility we can include these change.
So, its looks good for me, however someone else must approve it.
Quoted 5 lines
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
Quoted 38 lines · Daniel Díaz
The
Makefilelacks a couple of line continuation backslashes in anif' clause, which can make the subsequent rsync command go awry over the whole filesystem (rsync -a / /`).
/bin/sh: -c: line 5: syntax error: unexpected end of file make[1]: [all] Error 1 (ignored)TEST=$DIR"_test.sh"; \ if [ -e $DIR/$TEST ]; then /bin/sh: -c: line 2: syntax error: unexpected end of file make[1]: [all] Error 1 (ignored) rsync -a $DIR/$TEST $BUILD_TARGET/; [...a myriad of:] [ rsync: readlink_stat("...") failed: Permission denied (13)] [ skipping non-regular file "..."] [ rsync: opendir "..." failed: Permission denied (13)][and many other errors...]
fi
make[1]: fi: Command not found
make[1]: [all] Error 127 (ignored)
done
make[1]: done: Command not found
make[1]: [all] Error 127 (ignored)Signed-off-by Daniel Díaz <daniel.diaz at linaro.org>--- tools/testing/selftests/android/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)tools/testing/selftests/android/Makefile +1
-1@@ -11,11 +11,11 @@ all: BUILD_TARGET=$(OUTPUT)/$$DIR; \ mkdir $$BUILD_TARGET -p; \ make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ - #SUBDIR test prog name should be in the form: SUBDIR_test.sh + #SUBDIR test prog name should be in the form: SUBDIR_test.sh \
tools/testing/selftests/android/Makefile all: · line 21
Quoted 10 lines
tools/testing/selftests/android/Makefile +3
-3TEST=$$DIR"_test.sh"; \ - if [ -e $$DIR/$$TEST ]; then - rsync -a $$DIR/$$TEST $$BUILD_TARGET/; - fi + if [ -e $$DIR/$$TEST ]; then \ + rsync -a $$DIR/$$TEST $$BUILD_TARGET/; \ + fi \ done override define RUN_TESTS
Quoted 3 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
Quoted 39 lines · Daniel Díaz
The
Makefilelacks a couple of line continuation backslashes in anif' clause, which can make the subsequent rsync command go awry over the whole filesystem (rsync -a / /`).
/bin/sh: -c: line 5: syntax error: unexpected end of file make[1]: [all] Error 1 (ignored)TEST=$DIR"_test.sh"; \ if [ -e $DIR/$TEST ]; then /bin/sh: -c: line 2: syntax error: unexpected end of file make[1]: [all] Error 1 (ignored) rsync -a $DIR/$TEST $BUILD_TARGET/; [...a myriad of:] [ rsync: readlink_stat("...") failed: Permission denied (13)] [ skipping non-regular file "..."] [ rsync: opendir "..." failed: Permission denied (13)][and many other errors...]
fi
make[1]: fi: Command not found
make[1]: [all] Error 127 (ignored)
done
make[1]: done: Command not found
make[1]: [all] Error 127 (ignored)Signed-off-by Daniel Díaz <daniel.diaz at linaro.org>--- tools/testing/selftests/android/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)tools/testing/selftests/android/Makefile +1
-1@@ -11,11 +11,11 @@ all: BUILD_TARGET=$(OUTPUT)/$$DIR; \ mkdir $$BUILD_TARGET -p; \ make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ - #SUBDIR test prog name should be in the form: SUBDIR_test.sh + #SUBDIR test prog name should be in the form: SUBDIR_test.sh \
tools/testing/selftests/android/Makefile all: · line 21
Quoted 10 lines
tools/testing/selftests/android/Makefile +3
-3TEST=$$DIR"_test.sh"; \ - if [ -e $$DIR/$$TEST ]; then - rsync -a $$DIR/$$TEST $$BUILD_TARGET/; - fi + if [ -e $$DIR/$$TEST ]; then \ + rsync -a $$DIR/$$TEST $$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