From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by sourceware.org (Postfix) with ESMTPS id B9FB53971806 for ; Mon, 25 Jan 2021 22:51:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B9FB53971806 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=lukma@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4DPlTc2krrz1rtMh; Mon, 25 Jan 2021 23:51:16 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4DPlTb75Kmz1s8V0; Mon, 25 Jan 2021 23:51:15 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id LjcSbG7QgLgT; Mon, 25 Jan 2021 23:51:14 +0100 (CET) X-Auth-Info: 6rLtMAhWR3/p2oJ62kkTnVC9VIhiUUdxQashoU+WYG0= Received: from jawa (89-64-25-12.dynamic.chello.pl [89.64.25.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Mon, 25 Jan 2021 23:51:14 +0100 (CET) Date: Mon, 25 Jan 2021 23:51:07 +0100 From: Lukasz Majewski To: Joseph Myers Cc: Adhemerval Zanella , Florian Weimer , GNU C Library , Florian Weimer , Alistair Francis Subject: Re: [PATCH] tst: Provide Y2038 tests for mktime (tst-mktime4.c) Message-ID: <20210125235107.271e9102@jawa> In-Reply-To: References: <20210125130308.32242-1-lukma@denx.de> <20210125223150.692ec27b@jawa> Organization: denx.de X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/+g4zyonS5Pz75ZD./1G9r9l"; protocol="application/pgp-signature" X-Spam-Status: No, score=2.8 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_ABUSEAT, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SBL_CSS, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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, 25 Jan 2021 22:51:19 -0000 --Sig_/+g4zyonS5Pz75ZD./1G9r9l Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Joseph, > On Mon, 25 Jan 2021, Lukasz Majewski wrote: >=20 > > 1. On 32 bit ports - check correct operation of mktime for 32 bit > > time_t. If those checks fail, then we fail the test. =20 >=20 > But if those checks pass, the test will end with UNSUPPORTED rather > than PASS. If there is anything useful to verify on 32-bit ports, > the test should end with PASS if that verification succeeds and FAIL > if that verification fails - not with a choice of UNSUPPORTED and > FAIL. >=20 Please correct me if I'm wrong. Then the mktime4 test shall be as follows: 1. tst-mktime4-32time.c /* mktime tests which can be safely run with 32 bit time_t */ test_mktime_helper (&tm0, 0); test_mktime_helper (&tmY2038, 0x7fffffff); 2. tst-mktime4-64time.c if (sizeof (time_t) > 4) { Reuse code from tst-mktime4-32time.c and add extra: test_mktime_helper (&tmY2038, 0x80000000); } else FAIL_UNSUPPORTED ("32-bit time_t"); 3. tst-mktime4-y2038.c #define _TIME_BITS 64 #define _FILE_OFFSET_BITS 64 #include "tst-mktime4-64time.c" When we got -D_TIME_BITS=3D64 support in glibc accepted. Above use cases shall cover all use cases. Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de --Sig_/+g4zyonS5Pz75ZD./1G9r9l Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEgAyFJ+N6uu6+XupJAR8vZIA0zr0FAmAPS1wACgkQAR8vZIA0 zr1eZwf/WYJR/Y2Uj9S4k/QdeB8J/7F1Wgs5em1UT+YDl/rLcbe3MRfkvNTPqDHh VMvFT3aSaqcaD6VZZ+9uUmwOaDTSQoWsqVThTDgZVg/Q9JLCUsZ4okO1C7ZmKzAs vXwXku2IbzYVncFhjOlro/NrPAPDJb1wpxO5P49bMqeZEvBOjYvQHufjEcIse8wT E5rhRAY/mWEWoZpHirxC7KyXdhQB442HSHyJwGtssQWFNpEQGWLKWFIae6qM+VQv /x+UUopRfn4iTK3VkQ3IGGXLtjJ6zcuBOA3vbZI3UsE5J71tS1Niib2fj4l7Xmit u4I0QuXRiT1EWP/oZ2oJA0xfLnHRuQ== =16OU -----END PGP SIGNATURE----- --Sig_/+g4zyonS5Pz75ZD./1G9r9l--