From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 07C92385843E for ; Mon, 7 Feb 2022 14:08:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 07C92385843E Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 217Dhbbk011364 for ; Mon, 7 Feb 2022 14:08:02 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3e1hux8shq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 07 Feb 2022 14:08:02 +0000 Received: from m0098414.ppops.net (m0098414.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 217E2d01002806 for ; Mon, 7 Feb 2022 14:08:02 GMT Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0b-001b2d01.pphosted.com with ESMTP id 3e1hux8sha-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Feb 2022 14:08:02 +0000 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 217E28I4031059; Mon, 7 Feb 2022 14:08:01 GMT Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by ppma02dal.us.ibm.com with ESMTP id 3e1gvachs5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Feb 2022 14:08:01 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 217E80EL31850972 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 7 Feb 2022 14:08:00 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 24577BE05A; Mon, 7 Feb 2022 14:08:00 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D35ABBE061; Mon, 7 Feb 2022 14:07:58 +0000 (GMT) Received: from TP480.linux.ibm.com (unknown [9.160.37.57]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP; Mon, 7 Feb 2022 14:07:58 +0000 (GMT) References: <20220203214215.3275256-1-goldstein.w.n@gmail.com> <20220203214215.3275256-2-goldstein.w.n@gmail.com> User-agent: mu4e 1.6.6; emacs 27.2 From: Matheus Castanho To: Noah Goldstein Cc: libc-alpha@sourceware.org Subject: Re: [PATCH v4 2/5] string: Improve coverage in test-strcmp.c and test-strncmp.c Date: Mon, 07 Feb 2022 10:59:05 -0300 In-reply-to: <20220203214215.3275256-2-goldstein.w.n@gmail.com> Message-ID: <87o83idb2a.fsf@linux.ibm.com> Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: aVfeJEI0zXKwCtbU3xvXQR2flF1LC-U1 X-Proofpoint-GUID: 9uumV4krbZyHm70uEHMNaEZzfRbpdWiu X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-02-07_05,2022-02-07_02,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 impostorscore=0 bulkscore=0 adultscore=0 priorityscore=1501 suspectscore=0 mlxscore=0 mlxlogscore=884 spamscore=0 malwarescore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202070091 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, 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 14:08:05 -0000 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. -- Matheus Castanho