-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #919 from sg2342/extended_start_script_tests_pathn…
…ame_escape add shelltest for pathname quoting in extended_start_script
- Loading branch information
Showing
4 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
shelltests/extended_start_script_tests/config/pathname_escape.sys.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[]. |
2 changes: 2 additions & 0 deletions
2
shelltests/extended_start_script_tests/config/pathname_escape.vm.args
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-sname node@localhost | ||
-setcookie cookie1 |
34 changes: 34 additions & 0 deletions
34
shelltests/extended_start_script_tests/extended_start_script_tests_pathname_escape.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
$ rebar3 as pathname_escape tar -n pathname_escape | ||
> / Tarball successfully created: / | ||
>= 0 | ||
|
||
# make a file _build/p that contains all bytes 0x01..0x0f except | ||
# 0x00 (NUL) and 0x2f (/) : because those must not be part of a POSIX filename | ||
# | ||
# also exclude 0x22 ("), 0x60 (`) and anything > 0x0f : the extendend_bin | ||
# script can handle it but various parts of the erlang runtime (that exec /bin/sh | ||
# with unsanatized input) would fail. | ||
# | ||
# use the content of the _build/p as filename component of the release ROOTDIR | ||
# | ||
$ for c in $(for x in $(seq 1 33) $(seq 35 46) $(seq 48 95) $(seq 97 127); do printf '%03o\n' $x; done); do printf \\$c ; done > ./_build/p | ||
>= 0 | ||
|
||
$ mkdir -p "./_build/test/$(cat ./_build/p)" | ||
>= 0 | ||
|
||
$tar -C "./_build/test/$(cat ./_build/p)" -xf ./_build/pathname_escape/rel/pathname_escape/pathname_escape-0.1.0.tar.gz | ||
|
||
$ "./_build/test/$(cat ./_build/p)/bin/pathname_escape" daemon | ||
>= 0 | ||
|
||
$ sleep 1 | ||
>= 0 | ||
|
||
$ "./_build/test/$(cat ./_build/p)/bin/pathname_escape" ping | ||
> | ||
pong | ||
>= 0 | ||
|
||
$ "./_build/test/$(cat ./_build/p)/bin/pathname_escape" stop | ||
>= 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters