diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-03-24 15:48:34 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-03-25 09:50:45 -0300 |
commit | 4eda036f5b897fa8bc20ddd2099b5a6ed4239dc9 (patch) | |
tree | fa785188e8e095ef11a6dbb59aa7ba1bda9e2117 /stdlib/tst-system.c | |
parent | 1c17100c43c0913ec94f3bcc966bf3792236c690 (diff) | |
download | glibc-4eda036f5b897fa8bc20ddd2099b5a6ed4239dc9.tar.gz glibc-4eda036f5b897fa8bc20ddd2099b5a6ed4239dc9.tar.xz glibc-4eda036f5b897fa8bc20ddd2099b5a6ed4239dc9.zip |
stdlib: Move tst-system to tests-container
Fix some issues with different shell and error messages. Checked on x86_64-linux-gnu and i686-linux-gnu.
Diffstat (limited to 'stdlib/tst-system.c')
-rw-r--r-- | stdlib/tst-system.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/stdlib/tst-system.c b/stdlib/tst-system.c index c8c1811349..eddea33f4c 100644 --- a/stdlib/tst-system.c +++ b/stdlib/tst-system.c @@ -88,7 +88,8 @@ do_test (void) }); support_capture_subprocess_check (&result, "system", 0, sc_allow_stderr); - char *returnerr = xasprintf ("%s: 1: %s: not found\n", + char *returnerr = xasprintf ("%s: execing %s failed: " + "No such file or directory", basename(_PATH_BSHELL), cmd); TEST_COMPARE_STRING (result.err.buffer, returnerr); free (returnerr); @@ -106,7 +107,8 @@ do_test (void) }); support_capture_subprocess_check (&result, "system", 0, sc_allow_stderr); - char *returnerr = xasprintf ("%s: 1: %s: File name too long\n", + char *returnerr = xasprintf ("%s: execing %s failed: " + "File name too long", basename(_PATH_BSHELL), cmd); TEST_COMPARE_STRING (result.err.buffer, returnerr); free (returnerr); @@ -116,7 +118,7 @@ do_test (void) struct support_capture_subprocess result; result = support_capture_subprocess (call_system, &(struct args) { - "kill -USR1 $$", 0, SIGUSR1 + "kill $$", 0, SIGTERM }); support_capture_subprocess_check (&result, "system", 0, sc_allow_none); } @@ -136,7 +138,7 @@ do_test (void) support_capture_subprocess_check (&result, "system", 0, sc_allow_none); } - TEST_COMPARE (system (":"), 0); + TEST_COMPARE (system (""), 0); return 0; } |