diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2023-07-09 14:12:23 +0300 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2023-07-14 16:02:43 +0300 |
commit | 79a9288434aaa15407727474f26504214b027306 (patch) | |
tree | 0495bad047e5e10b9df58c4bfa479cc91bcb53c9 /winsup/testsuite | |
parent | 7c0750e96294c4c565fadc662219d56f93af389d (diff) |
Cygwin: testsuite: Also check direct call in systemcall
Check direct call to system(), as well as one in a subprocess.
(This is a lot easier to debug when it's completely broken by the
environment the test is running in)
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Diffstat (limited to 'winsup/testsuite')
-rw-r--r-- | winsup/testsuite/winsup.api/systemcall.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/winsup/testsuite/winsup.api/systemcall.c b/winsup/testsuite/winsup.api/systemcall.c index d10c9825c..74bd6f870 100644 --- a/winsup/testsuite/winsup.api/systemcall.c +++ b/winsup/testsuite/winsup.api/systemcall.c @@ -26,6 +26,14 @@ main (int argc, char **argv) fprintf (stderr, "couldn't redirect stdout to /dev/null, fd %d - %s\n", fd, strerror (errno)); exit (1); } + + n = system ("ls"); + if (n != 0) + { + fprintf (stderr, "system() (in parent) call returned %x\n", n); + exit (1); + } + if (pipe (fds)) { fprintf (stderr, "pipe call failed - %s\n", strerror (errno)); @@ -61,7 +69,7 @@ main (int argc, char **argv) } if (n != 0) { - fprintf (stderr, "system() call returned %x\n", n); + fprintf (stderr, "system() (in child) call returned %x\n", n); exit (1); } exit (0); |