diff options
| author | jvoisin | 2019-01-14 19:29:25 +0000 |
|---|---|---|
| committer | GitHub | 2019-01-14 19:29:25 +0000 |
| commit | e79f7e3bd992c7f0915ef9afe7afb6d79740527a (patch) | |
| tree | f881c25694eb00da2331a9ab280ec1c24a5662ab /src/tests/dump_request/dump_request_nonwriteable_folder.phpt | |
| parent | c943db586ac46b686b49bdf61d8473e39dd93000 (diff) | |
Reorganize the testsuite
Splitting the testsuite in several components makes it easier to manage and comprehend.
This was also needed some some tests aren't passing on Alpine Linux, but we still want to run
as many of them as we can on this platform.
Diffstat (limited to 'src/tests/dump_request/dump_request_nonwriteable_folder.phpt')
| -rw-r--r-- | src/tests/dump_request/dump_request_nonwriteable_folder.phpt | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/tests/dump_request/dump_request_nonwriteable_folder.phpt b/src/tests/dump_request/dump_request_nonwriteable_folder.phpt new file mode 100644 index 0000000..8052bc3 --- /dev/null +++ b/src/tests/dump_request/dump_request_nonwriteable_folder.phpt | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | --TEST-- | ||
| 2 | Dump request - nonwriteable folder. | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php | ||
| 5 | if (!extension_loaded("snuffleupagus")) { print "skip"; } | ||
| 6 | |||
| 7 | // root has write privileges "any" folders | ||
| 8 | if (TRUE == function_exists("posix_getuid")) { | ||
| 9 | if (0 == posix_getuid()) { | ||
| 10 | print "skip"; | ||
| 11 | } | ||
| 12 | } elseif (TRUE == function_exists("shell_exec")) { | ||
| 13 | if ("root" == trim(shell_exec("whoami"))) { | ||
| 14 | print "skip"; | ||
| 15 | } | ||
| 16 | } | ||
| 17 | |||
| 18 | ?> | ||
| 19 | --POST-- | ||
| 20 | post_a=data_post_a&post_b=data_post_b | ||
| 21 | --GET-- | ||
| 22 | get_a=data_get_a&get_b=data_get_b | ||
| 23 | --COOKIE-- | ||
| 24 | cookie_a=data_cookie_a&cookie_b=data_cookie_b | ||
| 25 | --INI-- | ||
| 26 | sp.configuration_file={PWD}/config/dump_request_nonwriteable_folder.ini | ||
| 27 | --FILE-- | ||
| 28 | <?php | ||
| 29 | echo "1\n"; | ||
| 30 | echo system("echo 1337;"); | ||
| 31 | echo "2\n"; | ||
| 32 | ?> | ||
| 33 | --EXPECTF-- | ||
| 34 | 1 | ||
| 35 | |||
| 36 | Warning: [snuffleupagus][request_logging] Unable to open %a: Permission denied in %a/dump_request_nonwriteable_folder.php on line %d | ||
| 37 | |||
| 38 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system' in %a/dump_request_nonwriteable_folder.php on line 3 | ||
