From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id 8900F3858C83 for ; Mon, 7 Feb 2022 20:17:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8900F3858C83 Received: by mail-pf1-x434.google.com with SMTP id a8so14946210pfa.6 for ; Mon, 07 Feb 2022 12:17:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CyDa5o9+sUZzXQws3mg1i1R4lB2TyYLZhzazMI9FeT4=; b=Cen6sta4yog+Gtf5GDNV9dp7EoWfnz7ieDTb1C6i0JvfjQ2b6o8b/bCJk7z9cPclfP EFEmGxMKob1H4WE77+TDYcXxjqSKxH4bR7CMSMpxPUo69B2Pbx9M3zY1eZ6Ntz+4WUU3 3UyccOKuGKGFbekwVkABpjDHui+iMzZNjzAuNmSFNC68Z1qFP3hu/TKeFtCiryWXi7SL laEQPjX/v7tWUPkN4pbi3CUJ9zagzObsJCZlbK+bquDEenpsKPiZPLiiTgY9TUsvaqsB lQ/CV+XRtX+psMVhYwKmEbbpXFOxsBQ9aG5sPMo5J2ptksLMz8di1pDhuOGxCIZlGzKe mgyQ== X-Gm-Message-State: AOAM530i7QhxvDvD3MQeihBn0RbdaytP9ZXoDg3sVDeP/1EUP5zaYLB+ uP87pXEVB43NjhcNyo8JvaKgixRlPvHDyMPfLU09y0oCmuk= X-Google-Smtp-Source: ABdhPJzmYm7VoWGAURlKwCFswCpff/P7Vy6xLQ9os5/519+HF2M4wuFibFPzaICd1HP7neUr+oH8LH9d1lu5Zo21YWs= X-Received: by 2002:a63:698a:: with SMTP id e132mr873988pgc.14.1644265063604; Mon, 07 Feb 2022 12:17:43 -0800 (PST) MIME-Version: 1.0 References: <20220203214215.3275256-1-goldstein.w.n@gmail.com> <20220203214215.3275256-2-goldstein.w.n@gmail.com> <87o83idb2a.fsf@linux.ibm.com> In-Reply-To: From: Noah Goldstein Date: Mon, 7 Feb 2022 14:17:32 -0600 Message-ID: Subject: Re: [PATCH v4 2/5] string: Improve coverage in test-strcmp.c and test-strncmp.c To: Matheus Castanho Cc: GNU C Library Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Feb 2022 20:17:46 -0000 On Mon, Feb 7, 2022 at 1:03 PM Noah Goldstein wrote: > > On Mon, Feb 7, 2022 at 8:08 AM Matheus Castanho wrote: > > > > > > Hi Noah, > > > > Noah Goldstein via Libc-alpha writes: > > > > > Add additional test cases for small / medium sizes. > > > > > > Add tests in test-strncmp.c where `n` is near ULONG_MAX or LONG_MIN to > > > test for overflow bugs in length handling. > > > > > > Signed-off-by: Noah Goldstein > > > --- > > > string/test-strcmp.c | 70 ++++++++++-- > > > string/test-strncmp.c | 257 +++++++++++++++++++++++++++++++++++++++--- > > > 2 files changed, 306 insertions(+), 21 deletions(-) > > > > > > diff --git a/string/test-strcmp.c b/string/test-strcmp.c > > > index 97d7bf5043..eacbdc8857 100644 > > > --- a/string/test-strcmp.c > > > +++ b/string/test-strcmp.c > > > @@ -16,6 +16,9 @@ > > > License along with the GNU C Library; if not, see > > > . */ > > > > > > +#define TEST_LEN (4096 * 3) > > > +#define MIN_PAGE_SIZE (TEST_LEN + 2 * getpagesize ()) > > > > Is this change really necessary? It broke the tests on ppc64le because > > the default page size is 64kB, which this new value is not a multiple > > of, causing mprotect to fail with EINVAL in test_init. Posted a patch I think fixes the issue at. ``` String: Ensure 'MIN_PAGE_SIZE' is factor of 'getpagesize' ``` > > We can make MIN_PAGE_SIZE (8 * getpagesize ())? > > > > -- > > Matheus Castanho