From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf36.google.com (mail-qv1-xf36.google.com [IPv6:2607:f8b0:4864:20::f36]) by sourceware.org (Postfix) with ESMTPS id B0C7C3844019 for ; Wed, 2 Jun 2021 17:51:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B0C7C3844019 Received: by mail-qv1-xf36.google.com with SMTP id 5so1801930qvk.0 for ; Wed, 02 Jun 2021 10:51:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CYsxFii76ziCR/X5GsKuqxX43mnJuxHrnMt4K3iWbqE=; b=lGJjdE/+Uy9sK6NtmbykcEHqbqQnoZopdScb4YhAyRgm0/+bFOGGqF6FKPYNFVQQ0Y SYd6qe+3Bs4zlvwfcsqz/ZDPS89ClyLqiIT0+LZjXvBpD98pflvxjWMxrRDvesJhsMFN RH4LpL+vh4ZMu4BqE75WHVYw1+YI0rmN2HRVoEXHw5XD1Fl9BxE+Ohi2+x48GwptZqGB cJchTiTRlduqLeRzZyuOqIhgGnErK30tSQK6vIswKvRzQYUpsDJpWvSttVpN3I/nVEFP QqTmhJVag7s+bBHTPPIqKJ+1qGuQAJMZsOGqT35DFeDOWnXPvVspBEVqm9ss0LfSPTIg 1pHQ== X-Gm-Message-State: AOAM5320YB+O6OCRwseEBW7HXdeSk1i+csxp2q7lEz6fctaTGWqFdrXW wMm3+pNdsojWzjCp0+o1Z3hXFByoULGXBxsfQUOb3goHZm4= X-Google-Smtp-Source: ABdhPJx9pwj1/cP+GEjnwmtGFFTcorUbHSjMvUaq6dmMRryM4MruWgyCbbtreHNbg+H0tP12k7hyKoD9aYb9wmmdj20= X-Received: by 2002:a0c:d790:: with SMTP id z16mr29517789qvi.20.1622656272425; Wed, 02 Jun 2021 10:51:12 -0700 (PDT) MIME-Version: 1.0 References: <20210531180812.501625-1-skpgkp2@gmail.com> In-Reply-To: From: Sunil Pandey Date: Wed, 2 Jun 2021 10:51:01 -0700 Message-ID: Subject: Re: [PATCH v3] Improve test coverage of strlen function To: "H.J. Lu" Cc: GNU C Library X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, HK_RANDOM_ENVFROM, HK_RANDOM_FROM, HTML_MESSAGE, 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 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Wed, 02 Jun 2021 17:51:14 -0000 Hi, I am an Intel employee, working on glibc for x86. I have an account(skpgkp2) on sourceware.org. Can someone please tell me how to get write access to glibc git repo. Thanks, Sunil Pandey On Wed, Jun 2, 2021 at 5:40 AM H.J. Lu wrote: > On Mon, May 31, 2021 at 11:21:50AM -0700, H.J. Lu wrote: > > On Mon, May 31, 2021 at 11:08 AM Sunil K Pandey > wrote: > > > > > > This patch covers the following conditions: > > > > > > - Strings start with different alignments and end at the page boundary > > > with less than 64 byte length. > > > - Strings starts with different alignments and cross page boundary with > > > fixed length. > > > --- > > > string/test-strlen.c | 15 ++++++++++++++- > > > 1 file changed, 14 insertions(+), 1 deletion(-) > > > > > > diff --git a/string/test-strlen.c b/string/test-strlen.c > > > index 6e67d1f1f1..c9a7afb339 100644 > > > --- a/string/test-strlen.c > > > +++ b/string/test-strlen.c > > > @@ -79,7 +79,7 @@ do_test (size_t align, size_t len) > > > { > > > size_t i; > > > > > > - align &= 63; > > > + align &= (getpagesize () / sizeof (CHAR)) - 1; > > > if (align + sizeof (CHAR) * len >= page_size) > > > return; > > > > > > @@ -160,6 +160,19 @@ test_main (void) > > > do_test (sizeof (CHAR) * i, (size_t)((1 << i) / 1.5)); > > > } > > > > > > + /* Test strings near page boundary */ > > > + > > > + size_t maxlength = 64 / sizeof (CHAR) - 1; > > > + size_t pagesize = getpagesize () / sizeof (CHAR); > > > + > > > + for (i = maxlength ; i > 1; --i) > > > + { > > > + /* String stays on the same page. */ > > > + do_test (pagesize - i, i - 1); > > > + /* String crosses page boundary. */ > > > + do_test (pagesize - i, maxlength); > > > + } > > > + > > > do_random_tests (); > > > return ret; > > > } > > > -- > > > 2.31.1 > > > > > > > LGTM. > > > > Reviewed-by: H.J. Lu > > > > Hi Sunil, > > I am checking it in for you. Please get an account on sourceware.org: > > https://sourceware.org/ > > and use me as sponsor. > > Thanks. > > H.J. >