From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) by sourceware.org (Postfix) with ESMTPS id D4F6A385E00F for ; Wed, 25 Mar 2020 13:33:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D4F6A385E00F Received: by mail-qt1-x82f.google.com with SMTP id 10so2114447qtp.1 for ; Wed, 25 Mar 2020 06:33:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=3UCPt22Qgi2Co3x1V2j1fc08IfZwpX4h04wIWRUpbcw=; b=WSwopi2DECs6LnQrcb9phg2vb0rHy2Yd4Eu9cuefoXxefTn1vBm4M2TwpS6P4MtgIJ hFR+DfvGGV+ilAMQmDQCsAq54Bgv0M6lfrbJOqOFYc55z4W2XK2brlLbvKOyHn2Mnp55 Nx/8hSbPkX3G2iSCDJGPSQqYeX2oQxSUHbfgla+1wm7bYIMM1UoSIms0Fs23300fYl2S /SxAm+kMSW/VxIkRR9BGrvyaFC2YVi9lEDa1Tu7UB7tpaq/ojOe//eGrPenj4eonndgU xWC+aUNFbThwCk5HkUdnAyUoxZjp/mSBT+CiHHyhCrwgNBK65YsHLDTKlUN67xHcY8el bzAA== X-Gm-Message-State: ANhLgQ3IOe/uKPpZWKSKh66uuODyb9hJvCSL/2NXXKjPivAXLbJE2+dL rz4LVg8QJSerfE0zDyz4mj4WXYKJKLs= X-Google-Smtp-Source: ADFU+vuwvPODWxRcy7afRqiHPw3ZmsVA9HKdhD7G5RhDRqTa2WmwkD31bXng5rYtKyWuUzon1XsVsg== X-Received: by 2002:ac8:5395:: with SMTP id x21mr2699882qtp.321.1585143225102; Wed, 25 Mar 2020 06:33:45 -0700 (PDT) Received: from localhost.localdomain ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id z18sm17520373qtz.77.2020.03.25.06.33.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2020 06:33:44 -0700 (PDT) From: Adhemerval Zanella To: libc-stable@sourceware.org Subject: [2.30 COMMITTED] stdlib: Move tst-system to tests-container Date: Wed, 25 Mar 2020 10:33:36 -0300 Message-Id: <20200325133336.2530718-4-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200325133336.2530718-1-adhemerval.zanella@linaro.org> References: <20200325133336.2530718-1-adhemerval.zanella@linaro.org> X-Spam-Status: No, score=-26.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-stable@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-stable mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 13:33:47 -0000 Fix some issues with different shell and error messages. Checked on x86_64-linux-gnu and i686-linux-gnu. (cherry picked from commit 4eda036f5b897fa8bc20ddd2099b5a6ed4239dc9) --- 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; } -- 2.17.1