From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7847) id C49E73858006; Fri, 25 Feb 2022 13:58:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C49E73858006 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Raoni Fassina Firmino To: glibc-cvs@sourceware.org Subject: [glibc/ibm/2.30/master] string: Add a testcase for wcsncmp with SIZE_MAX [BZ #28755] X-Act-Checkin: glibc X-Git-Author: H.J. Lu X-Git-Refname: refs/heads/ibm/2.30/master X-Git-Oldrev: 8ad5519ae1cbfff987c5335253dfaa6bbccdddcb X-Git-Newrev: 70522b1c1d1ffa5e3bd55aa3c064ea93a330bde9 Message-Id: <20220225135833.C49E73858006@sourceware.org> Date: Fri, 25 Feb 2022 13:58:33 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Feb 2022 13:58:33 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=70522b1c1d1ffa5e3bd55aa3c064ea93a330bde9 commit 70522b1c1d1ffa5e3bd55aa3c064ea93a330bde9 Author: H.J. Lu Date: Thu Feb 17 08:10:35 2022 -0800 string: Add a testcase for wcsncmp with SIZE_MAX [BZ #28755] Verify that wcsncmp (L("abc"), L("abd"), SIZE_MAX) == 0. The new test fails without commit ddf0992cf57a93200e0c782e2a94d0733a5a0b87 Author: Noah Goldstein Date: Sun Jan 9 16:02:21 2022 -0600 x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755] and commit 7e08db3359c86c94918feb33a1182cd0ff3bb10b Author: Noah Goldstein Date: Sun Jan 9 16:02:28 2022 -0600 x86: Fix __wcsncmp_evex in strcmp-evex.S [BZ# 28755] This is for BZ #28755. Reviewed-by: Sunil K Pandey (cherry picked from commit aa5a720056d37cf24924c138a3dbe6dace98e97c) Diff: --- string/test-strncmp.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/string/test-strncmp.c b/string/test-strncmp.c index 042e85e399..af071bd847 100644 --- a/string/test-strncmp.c +++ b/string/test-strncmp.c @@ -403,6 +403,18 @@ check2 (void) free (s2); } +static void +check3 (void) +{ + const CHAR *s1 = L ("abc"); + CHAR *s2 = STRDUP (s1); + + FOR_EACH_IMPL (impl, 0) + check_result (impl, s1, s2, SIZE_MAX, 0); + + free (s2); +} + int test_main (void) { @@ -412,6 +424,7 @@ test_main (void) check1 (); check2 (); + check3 (); printf ("%23s", ""); FOR_EACH_IMPL (impl, 0)