summaryrefslogtreecommitdiff
path: root/tests/test-posix_spawnp-script.c
Commit message (Collapse)AuthorAgeFilesLines
* maint: run 'make update-copyright'Simon Josefsson2023-01-011-1/+1
|
* posix_spawnp-tests: fix filename typoPaul Eggert2022-12-221-1/+1
| | | | | | | | Problem reported for GNU m4 by Mitchell Dorrell in: https://lists.gnu.org/r/bug-m4/2022-12/msg00000.html * tests/test-posix_spawnp-script.c (DATA_FILENAME): Fix typo in file name that caused race with test-posix_spawn-script.c.
* license: fix GPLv3 texts to use a comma instead of semicolon.Bernhard Voelker2022-01-051-1/+1
| | | | | | | | | See: https://www.gnu.org/licenses/gpl-3.0.html#howto Run: $ git grep -l 'Foundation; either version 3' \ | xargs sed -i '/Foundation; either version 3/ s/n; e/n, e/' * All files using GPLv3: Adjust via the above command.
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* posix_spawn* tests: Add support for native Windows.Bruno Haible2020-12-241-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | * tests/test-posix_spawn-open1.c (DATA_FILENAME): Treat native Windows like Cygwin. * tests/test-posix_spawn-dup2-stdin.c (main): Don't assume the signals SIGHUP and SIGPIPE. On native Windows, don't call posix_spawnattr_setsigmask. * tests/test-posix_spawn-dup2-stdout.c (main): Likewise. * tests/test-posix_spawn-fchdir.c (main): Likewise. * tests/test-posix_spawn-chdir.c (test): Likewise. Accept the child output from Cygwin's 'pwd' program. * tests/test-posix_spawn-script.c (main): On native Windows, skip the executable-shell-script part of the test. * tests/test-posix_spawnp-script.c (main): Likewise. * modules/posix_spawn-tests (Depends-on): Add freopen, waitpid. (configure.ac): Don't define the POSIX_SPAWN_PORTED conditional. (Makefile.am): Don't test the POSIX_SPAWN_PORTED conditional. * modules/posix_spawnp-tests (Depends-on): Add waitpid. (configure.ac): Don't define the POSIX_SPAWN_PORTED conditional. (Makefile.am): Don't test the POSIX_SPAWN_PORTED conditional. * modules/posix_spawn_file_actions_addchdir-tests (Makefile.am): Don't test the POSIX_SPAWN_PORTED conditional. * modules/posix_spawn_file_actions_addfchdir-tests (configure.ac): Define the POSIX_SPAWN_PORTED conditional here.
* windows-spawn: Improve errno upon failure on native Windows.Bruno Haible2020-12-241-24/+30
| | | | | | | | | | | | | | | * lib/windows-spawn.c (spawnpvech): Map the CreateProcess errors ERROR_BAD_FORMAT and ERROR_BAD_EXE_FORMAT to ENOEXEC. * tests/executable-script.sh: New file. * tests/test-posix_spawn-script.c (main): Also try executing executable-script.sh. * tests/test-posix_spawnp-script.c (main): Likewise. * tests/test-execute-script.c (main): Likewise. * tests/test-spawn-pipe-script.c (main): Likewise. * modules/posix_spawn-tests (Files): Add tests/executable-script.sh. * modules/posix_spawnp-tests (Files): Likewise. * modules/execute-tests (Files): Likewise. * modules/spawn-pipe-tests (Files): Likewise.
* Add unit tests regarding execution of scripts.Bruno Haible2020-12-241-0/+143
* tests/executable-script: New file. * tests/executable-shell-script: New file. * tests/test-posix_spawn-script.c: New file. * tests/test-posix_spawnp-script.c: New file. * tests/test-execute-script.c: New file. * tests/test-spawn-pipe-script.c: New file. * modules/posix_spawn-tests (Files): Add tests/test-posix_spawn-script.c, tests/executable-script, tests/executable-shell-script. (Makefile.am): Compile and run test-posix_spawn-script. * modules/posix_spawnp-tests (Files): Add tests/test-posix_spawnp-script.c, tests/executable-script, tests/executable-shell-script. (Makefile.am): Compile and run test-posix_spawnp-script. * modules/execute-tests (Files): Add tests/test-execute-script.c, tests/executable-script, tests/executable-shell-script. (Makefile.am): Compile and run test-execute-script. * modules/spawn-pipe-tests (Files): Add tests/test-spawn-pipe-script.c, tests/executable-script, tests/executable-shell-script. (Makefile.am): Compile and run test-spawn-pipe-script.