Skip to content

Commit 64136fb

Browse files
mrchappShuah Khan
authored andcommitted
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) Signed-off-by: Daniel Díaz <[email protected]> Acked-by: Pintu Agarwal <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
1 parent 70b574e commit 64136fb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/testing/selftests/android/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ all:
1111
BUILD_TARGET=$(OUTPUT)/$$DIR; \
1212
mkdir $$BUILD_TARGET -p; \
1313
make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
14-
#SUBDIR test prog name should be in the form: SUBDIR_test.sh
14+
#SUBDIR test prog name should be in the form: SUBDIR_test.sh \
1515
TEST=$$DIR"_test.sh"; \
16-
if [ -e $$DIR/$$TEST ]; then
17-
rsync -a $$DIR/$$TEST $$BUILD_TARGET/;
18-
fi
16+
if [ -e $$DIR/$$TEST ]; then \
17+
rsync -a $$DIR/$$TEST $$BUILD_TARGET/; \
18+
fi \
1919
done
2020

2121
override define RUN_TESTS

0 commit comments

Comments
 (0)