From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id F363D3858C83 for ; Mon, 7 Feb 2022 19:03:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F363D3858C83 Received: by mail-pf1-x430.google.com with SMTP id v74so14623528pfc.1 for ; Mon, 07 Feb 2022 11:03:24 -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=SmCvNJFSyZAZVPa/2J0ngNZQO4JtfdwadBkAUlK+FIU=; b=T3Tat6Ipb+lVtsXgfBaCeP7/fnYliqPa6yF0PLgEOrnSlTAPtv/dfBw4E7fju1xDEJ A3EVsLXQ/O7Ccy6D1gWODrU1+6NOoH/Yv94VWjPIHOlau0j3f6zOuDfDNBCUPRc+NM+O 4Q8D5a8Dx+bUzb9cTGL472YdtpfuLLwnCSxU2/4MkglSVyhYH7AWyaLwKyRB717ybvBw RRbkqVb+koiOUmf6b7F8gZn6WknCn6Xz2+FFo+3dkrm3M7XP7hazb4UtRb3H1gJEB4+x 6s5GR3mmuWQOYL3olAe/DhfZubORDkDEaRPTgzCzhJBLGy9WPvDJqC1luAlVLxuXAttR 5DJg== X-Gm-Message-State: AOAM530BkKeA0FmGqttr0HHMh8pzDsXASIxb/GcLsNDe5/U6Wtdi05+s nzqMJnrEnsgx2O/kTxs6tathBnhteOSh+bFQdNMEvf3Z X-Google-Smtp-Source: ABdhPJwIR+SMXoxMwbejLQPNhqCntOlXVUMXZVKACOl97gHTaTdoG//OcttzQ41JykZioFowAeq9PkXJC05RbNFY+Ag= X-Received: by 2002:a63:6a06:: with SMTP id f6mr663544pgc.18.1644260603985; Mon, 07 Feb 2022 11:03:23 -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: <87o83idb2a.fsf@linux.ibm.com> From: Noah Goldstein Date: Mon, 7 Feb 2022 13:03:13 -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.3 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 19:03:26 -0000 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. We can make MIN_PAGE_SIZE (8 * getpagesize ())? > > -- > Matheus Castanho