public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/release/2.30/master] stdlib: Move tst-system to tests-container Date: Wed, 25 Mar 2020 13:32:05 +0000 (GMT) [thread overview] Message-ID: <20200325133205.32821385E009@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c56022269f45fc7cc01806bce2cb5ed596718597 commit c56022269f45fc7cc01806bce2cb5ed596718597 Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> Date: Tue Mar 24 15:48:34 2020 -0300 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. (cherry picked from commit 4eda036f5b897fa8bc20ddd2099b5a6ed4239dc9) Diff: --- stdlib/Makefile | 3 ++- stdlib/tst-system.c | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/stdlib/Makefile b/stdlib/Makefile index 32f6050ecc..4b2bdb08af 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -70,7 +70,7 @@ tests := tst-strtol tst-strtod testmb testrand testsort testdiv \ test-canon test-canon2 tst-strtoll tst-environ \ tst-xpg-basename tst-random tst-random2 tst-bsearch \ tst-limits tst-rand48 bug-strtod tst-setcontext \ - tst-setcontext2 test-a64l tst-qsort tst-system testmb2 \ + tst-setcontext2 test-a64l tst-qsort testmb2 \ bug-strtod2 tst-atof1 tst-atof2 tst-strtod2 \ tst-rand48-2 tst-makecontext tst-strtod5 \ tst-qsort2 tst-makecontext2 tst-strtod6 tst-unsetenv1 \ @@ -92,6 +92,7 @@ tests := tst-strtol tst-strtod testmb testrand testsort testdiv \ tests-internal := tst-strtod1i tst-strtod3 tst-strtod4 tst-strtod5i \ tst-tls-atexit tst-tls-atexit-nodelete tests-static := tst-secure-getenv +tests-container := tst-system ifeq ($(build-hardcoded-path-in-tests),yes) tests += tst-empty-env diff --git a/stdlib/tst-system.c b/stdlib/tst-system.c index 09a5c05cab..8e1f23d5c9 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; }
reply other threads:[~2020-03-25 13:32 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200325133205.32821385E009@sourceware.org \ --to=azanella@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).