summaryrefslogtreecommitdiff
path: root/modules/spawn-pipe-tests
Commit message (Collapse)AuthorAgeFilesLines
* spawn-pipe: Fix test failure when running under QEMU user-mode.Bruno Haible2021-08-301-0/+2
| | | | | | | | * tests/test-spawn-pipe-child.c: Include <stdbool.h>, <string.h>, qemu.h. (main): Under QEMU user-mode, allow fd 2 or fd 3 to be open. * modules/spawn-pipe-tests (Files): Add qemu.h. (Depends-on): Add stdbool.
* execute tests: Fix test failure when libtool is in use.Bruno Haible2021-08-251-0/+1
| | | | | | | | | * modules/execute-tests (Makefile.am): Link test-execute-child without using libtool. * modules/spawn-pipe-tests (Makefile.am): Link test-spawn-pipe-child without using libtool. * modules/system-quote-tests (Makefile.am): Link test-system-quote-child without using libtool.
* windows-spawn: Improve errno upon failure on native Windows.Bruno Haible2020-12-241-0/+1
| | | | | | | | | | | | | | | * 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/+8
| | | | | | | | | | | | | | | | | | | | | | | * 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.
* spawn-pipe tests: Fix test failure with MSVC.Bruno Haible2020-11-291-0/+2
| | | | | | | * tests/test-spawn-pipe-child.c: Include <stdint.h>. (gl_msvc_invalid_parameter_handler): New function. (main): Set a global invalid-parameter handler. * modules/spawn-pipe-tests (Depends-on): Add msvc-inval, stdint.
* Fix link errors on AIX.Bruno Haible2020-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * modules/clean-temp (Link): Link with $(LIBTHREAD). * modules/getumask (Link): Link with $(LIBTHREAD). * modules/getumask-tests (Makefile.am): Link test-getumask with $(LIBTHREAD). * modules/supersede (Link): Link with $(LIBTHREAD). * modules/supersede-tests (Makefile.am): Link test-supersede with $(LIBTHREAD). * modules/fatal-signal (Link): New section. * modules/execute (Link): New section. * modules/csharpexec (Link): Link with $(LIBTHREAD). * modules/javaexec (Link): Link with $(LIBTHREAD). * modules/spawn-pipe (Link): New section. * modules/spawn-pipe-tests (Makefile.am): Link test-spawn-pipe-main with $(LIBTHREAD). * modules/csharpcomp (Link): Link with $(LIBTHREAD). * modules/javacomp (Link): Link with $(LIBTHREAD). * modules/javaversion (Link): Link with $(LIBTHREAD). * modules/pipe-filter-gi (Link): New section. * modules/pipe-filter-gi-tests (Makefile.am): Link test-pipe-filter-gi1, test-pipe-filter-gi2-main with $(LIBTHREAD). * modules/pipe-filter-ii (Link): New section. * modules/pipe-filter-ii-tests (Makefile.am): Link test-pipe-filter-ii1, test-pipe-filter-ii2-main with $(LIBTHREAD). * modules/term-style-control (Link): New section. * modules/term-style-control-tests (Makefile.am): Link test-term-style-control-hello, test-term-style-control-yes with $(LIBTHREAD). * modules/wait-process (Link): New section. * modules/nonblocking-pipe-tests (Makefile.am): Link test-nonblocking-pipe-main with $(LIBTHREAD). * modules/nonblocking-socket-tests (Makefile.am): Link test-nonblocking-socket-main with $(LIBTHREAD).
* Port tests away from prognamePino Toscano2016-09-051-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modules that need the program name already depend on getprogname. * modules/acl-tests (Depends-on): Remove progname. * modules/argmatch (Depends-on): Likewise. * modules/argmatch-tests (Depends-on): Likewise. * modules/argp-tests (Depends-on): Likewise. * modules/argp-version-etc-tests (Depends-on): Likewise. * modules/array-list-tests (Depends-on): Likewise. * modules/array-oset-tests (Depends-on): Likewise. * modules/avltree-list-tests (Depends-on): Likewise. * modules/avltree-oset-tests (Depends-on): Likewise. * modules/avltreehash-list-tests (Depends-on): Likewise. * modules/carray-list-tests (Depends-on): Likewise. * modules/copy-file-tests (Depends-on): Likewise. * modules/exclude-tests (Depends-on): Likewise. * modules/fchownat-tests (Depends-on): Likewise. * modules/fdopendir-tests (Depends-on): Likewise. * modules/filenamecat-tests (Depends-on): Likewise. * modules/fstatat-tests (Depends-on): Likewise. * modules/fstrcmp-tests (Depends-on): Likewise. * modules/linked-list-tests (Depends-on): Likewise. * modules/linkedhash-list-tests (Depends-on): Likewise. * modules/mkdirat-tests (Depends-on): Likewise. * modules/nonblocking-pipe-tests (Depends-on): Likewise. * modules/nonblocking-socket-tests (Depends-on): Likewise. * modules/obstack-printf-tests (Depends-on): Likewise. * modules/openat-tests (Depends-on): Likewise. * modules/parse-datetime-tests (Depends-on): Likewise. * modules/pipe-filter-gi-tests (Depends-on): Likewise. * modules/pipe-filter-ii-tests (Depends-on): Likewise. * modules/quotearg-simple-tests (Depends-on): Likewise. * modules/quotearg-tests (Depends-on): Likewise. * modules/rbtree-list-tests (Depends-on): Likewise. * modules/rbtree-oset-tests (Depends-on): Likewise. * modules/rbtreehash-list-tests (Depends-on): Likewise. * modules/spawn-pipe-tests (Depends-on): Likewise. * modules/system-quote-tests (Depends-on): Likewise. * modules/uniname/uniname-tests (Depends-on): Likewise. * modules/uninorm/nfc-tests (Depends-on): Likewise. * modules/uninorm/nfd-tests (Depends-on): Likewise. * modules/uninorm/nfkc-tests (Depends-on): Likewise. * modules/uninorm/nfkd-tests (Depends-on): Likewise. * modules/unistdio/u16-vsnprintf-tests (Depends-on): Likewise. * modules/unistdio/u16-vsprintf-tests (Depends-on): Likewise. * modules/unistdio/u32-vsnprintf-tests (Depends-on): Likewise. * modules/unistdio/u32-vsprintf-tests (Depends-on): Likewise. * modules/unistdio/u8-vsnprintf-tests (Depends-on): Likewise. * modules/unistdio/u8-vsprintf-tests (Depends-on): Likewise. * modules/unistdio/ulc-vsnprintf-tests (Depends-on): Likewise. * modules/unistdio/ulc-vsprintf-tests (Depends-on): Likewise. * modules/unlinkat-tests (Depends-on): Likewise. * modules/version-etc-tests (Depends-on): Likewise. * modules/xalloc-die-tests (Depends-on): Likewise. * modules/xmemdup0-tests (Depends-on): Likewise. * modules/xprintf-posix-tests (Depends-on): Likewise. * modules/xvasprintf-tests (Depends-on): Likewise. * tests/test-argmatch.c: Do not include progname.h. (main) Stop calling set_program_name. * tests/test-argp-version-etc.c: Likewise. * tests/test-argp.c: Likewise. * tests/test-argv-iter.c: Likewise. * tests/test-array_list.c: Likewise. * tests/test-array_oset.c: Likewise. * tests/test-avltree_list.c: Likewise. * tests/test-avltree_oset.c: Likewise. * tests/test-avltreehash_list.c: Likewise. * tests/test-carray_list.c: Likewise. * tests/test-copy-acl.c: Likewise. * tests/test-copy-file.c: Likewise. * tests/test-exclude.c: Likewise. * tests/test-fchownat.c: Likewise. * tests/test-fdopendir.c: Likewise. * tests/test-filenamecat.c: Likewise. * tests/test-fstatat.c: Likewise. * tests/test-fstrcmp.c: Likewise. * tests/test-linked_list.c: Likewise. * tests/test-linkedhash_list.c: Likewise. * tests/test-mkdirat.c: Likewise. * tests/test-nonblocking-pipe-main.c: Likewise. * tests/test-nonblocking-socket-main.c: Likewise. * tests/test-obstack-printf.c: Likewise. * tests/test-openat.c: Likewise. * tests/test-parse-datetime.c: Likewise. * tests/test-pipe-filter-gi1.c: Likewise. * tests/test-pipe-filter-gi2-main.c: Likewise. * tests/test-pipe-filter-ii1.c: Likewise. * tests/test-pipe-filter-ii2-main.c: Likewise. * tests/test-quotearg-simple.c: Likewise. * tests/test-quotearg.c: Likewise. * tests/test-rbtree_list.c: Likewise. * tests/test-rbtree_oset.c: Likewise. * tests/test-rbtreehash_list.c: Likewise. * tests/test-sameacls.c: Likewise. * tests/test-set-mode-acl.c: Likewise. * tests/test-spawn-pipe-main.c: Likewise. * tests/test-system-quote-main.c: Likewise. * tests/test-unlinkat.c: Likewise. * tests/test-version-etc.c: Likewise. * tests/test-xalloc-die.c: Likewise. * tests/test-xfprintf-posix.c: Likewise. * tests/test-xmemdup0.c: Likewise. * tests/test-xprintf-posix.c: Likewise. * tests/test-xvasprintf.c: Likewise. * tests/uniname/test-uninames.c: Likewise. * tests/uninorm/test-u32-nfc-big.c: Likewise. * tests/uninorm/test-u32-nfd-big.c: Likewise. * tests/uninorm/test-u32-nfkc-big.c: Likewise. * tests/uninorm/test-u32-nfkd-big.c: Likewise. * tests/unistdio/test-u16-vsnprintf1.c: Likewise. * tests/unistdio/test-u16-vsprintf1.c: Likewise. * tests/unistdio/test-u32-vsnprintf1.c: Likewise. * tests/unistdio/test-u32-vsprintf1.c: Likewise. * tests/unistdio/test-u8-vsnprintf1.c: Likewise. * tests/unistdio/test-u8-vsprintf1.c: Likewise. * tests/unistdio/test-ulc-vsnprintf1.c: Likewise. * tests/unistdio/test-ulc-vsprintf1.c: Likewise. * tests/test-c-stack.c: (program_name): Do not define. (main): Do not set program_name. * tests/test-closein.c: Likewise. * tests/test-xstrtol.c: Likewise. * tests/test-yesno.c: Likewise.
* spawn-pipe tests: Fix a NULL program name in a diagnostic.Bruno Haible2012-02-041-0/+1
| | | | | | * tests/test-spawn-pipe-main.c: Include progname.h. (main): Invoke set_program_name. * modules/spawn-pipe-tests (Depends-on): Add progname.
* close: Support for MSVC 9.Bruno Haible2011-09-241-0/+1
| | | | | | | | | | | | | | | * lib/close.c: Include <errno.h>, msvc-inval.h. (close_nothrow): New function. (rpl_close): Use it. * m4/close.m4 (gl_FUNC_CLOSE): Replace close if the platform has an invalid parameter handler. * modules/close (Depends-on): Add msvc-inval. * modules/dup2-tests (Depends-on): Add close. * modules/dup3-tests (Depends-on): Likewise. * modules/fcntl-tests (Depends-on): Likewise. * modules/spawn-pipe-tests (Depends-on): Likewise. * modules/unistd-safer-tests (Depends-on): Likewise. * doc/posix-functions/close.texi: Mention the problem on MSVC.
* Tests: Remove unnecessary dependency.Bruno Haible2011-06-171-1/+0
| | | | | | | | | | | | | | * modules/canonicalize-tests (Depends-on): Remove progname. * modules/chown-tests (Depends-on): Likewise. * modules/dirname-tests (Depends-on): Likewise. * modules/fdopendir-tests (Depends-on): Likewise. * modules/fdutimensat-tests (Depends-on): Likewise. * modules/hash-tests (Depends-on): Likewise. * modules/lchown-tests (Depends-on): Likewise. * modules/linkat-tests (Depends-on): Likewise. * modules/renameat-tests (Depends-on): Likewise. * modules/spawn-pipe-tests (Depends-on): Likewise. * modules/utimensat-tests (Depends-on): Likewise.
* spawn-pipe tests: Rename program.Bruno Haible2011-06-061-3/+3
| | | | | | | * tests/test-spawn-pipe-main.c: Renamed from tests/test-spawn-pipe.c. * tests/test-spawn-pipe-child.c: Update comment. * tests/test-spawn-pipe.sh: Update. * modules/spawn-pipe-tests (Files, Makefile.am): Update.
* spawn-pipe tests: Like the child program only against libc.Bruno Haible2011-06-061-1/+6
| | | | | | | | | | | | | | | | | * tests/test-spawn-pipe-child.c: New file, extracted from tests/test-spawn-pipe.c. (main): Expect only one argument. (is_open): New function, copied from tests/test-pipe.c. * tests/test-spawn-pipe.c: Don't include <errno.h>. (child_main): Remove function. (test_pipe): Pass only one argument to the child program. (main): Remove child process code. Expect the child program's name as first argument. * tests/test-spawn-pipe.sh: Pass the child program's name as first argument. * modules/spawn-pipe-tests (Files): Add tests/test-spawn-pipe-child.c. (Makefile.am): Add test-spawn-pipe-child to check_PROGRAMS. Link test-spawn-pipe-child against no libraries.
* Rename module 'pipe' to 'spawn-pipe'.Bruno Haible2010-12-111-0/+14
* modules/spawn-pipe: New file, renamed from modules/pipe. (Files, configure.ac, Makefile.am): Update. (Include): Mention "spawn-pipe.h" instead of "pipe.h". * modules/pipe: Reduce to an obsolete indirection to 'spawn-pipe'. * lib/spawn-pipe.h: New file, renamed from lib/pipe.h. * lib/spawn-pipe.c: New file, renamed from lib/pipe.c. Include "spawn-pipe.h" instead of "pipe.h". * m4/spawn-pipe.m4: New file, renamed from m4/pipe.m4. Rename gl_PIPE to gl_SPAWN_PIPE. * modules/spawn-pipe-tests: New file, renamed from modules/pipe-tests. (Files, Makefile.am): Update. * tests/test-spawn-pipe.sh: New file, renamed from tests/test-pipe.sh. Update. * tests/test-spawn-pipe.c: New file, renamed from tests/test-pipe.c. Include "spawn-pipe.h" instead of "pipe.h". * lib/csharpcomp.c: Include "spawn-pipe.h" instead of "pipe.h". * lib/javacomp.c: Likewise. * lib/javaversion.c: Likewise. * lib/pipe-filter-gi.c: Likewise. * lib/pipe-filter-ii.c: Likewise. * modules/csharpcomp (Depends-on): Add 'spawn-pipe', remove 'pipe'. * modules/javacomp (Depends-on): Likewise. * modules/javaversion (Depends-on): Likewise. * modules/pipe-filter-gi (Depends-on): Likewise. * modules/pipe-filter-ii (Depends-on): Likewise. * MODULES.html.sh (Executing programs): Update. * NEWS: Mention the change.