From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 8FE091F463 for ; Thu, 19 Sep 2019 22:01:03 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type; q=dns; s=default; b=VG77l arBBPT0H44p52UjgGroaGuNzC8sjFFwMuL715hloG1XLgChQovfYXAhYWXn5iK0n xN36+6Y1YBLnx3FYe0byQx08ntJFcBSKPpdOfgCR5Q6Cmfv5MNJ6FHf3erG1xobI upd8UZO12o4CA44MGoDdnZ7Ag/RCPRJ5bTAFTo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type; s=default; bh=cZkH9TihHrE zSm8T41RmPP2wIF0=; b=yZXbugp5RQW+hy4E826GX0MTUP1wY27fApX787p/+dn ml2bKhCXQm1qjcgMF3pxboBWBJVBGFh+WOud5TDFVZW84bWrnCwWHnU9Aa+p3IEO NAWrRBEm7vb/CZpwRBAJJwq821/O47F93mhpEsSjShy6C6gaBnVYX5gzXDEWtBGE = Received: (qmail 24924 invoked by alias); 19 Sep 2019 22:01:01 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 24911 invoked by uid 89); 19 Sep 2019 22:01:00 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-out.m-online.net Date: Fri, 20 Sep 2019 00:00:45 +0200 From: Lukasz Majewski To: Joseph Myers Cc: Alistair Francis , Alistair Francis , Zack Weinberg , Arnd Bergmann , GNU C Library , Adhemerval Zanella , Florian Weimer , Carlos O'Donell , Stepan Golosunov Subject: Re: [PATCH v8 3/3] y2038: linux: Provide __clock_settime64 implementation Message-ID: <20190920000045.163209f3@jawa> In-Reply-To: <20190919003341.194547ef@jawa> References: <20190918211603.8444-1-lukma@denx.de> <20190918211603.8444-4-lukma@denx.de> <20190919003341.194547ef@jawa> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/Ch3SWsNlAM7fB.TszVHPO2J"; protocol="application/pgp-signature" --Sig_/Ch3SWsNlAM7fB.TszVHPO2J Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Joseph, > Hi Joseph, >=20 > > On Wed, 18 Sep 2019, Lukasz Majewski wrote: > > =20 > > > Tests: > > > - The code has been tested with x86_64/x86 (native compilation): > > > make PARALLELMFLAGS=3D"-j8" && make xcheck PARALLELMFLAGS=3D"-j8" > > >=20 > > > - Run specific tests on ARM/x86 32bit systems (qemu): > > > https://github.com/lmajewski/meta-y2038 > > > and run tests: > > > https://github.com/lmajewski/y2038-tests/commits/master > > > on kernels with and without 64 bit time support. =20 > >=20 > > Could you give more details of the configurations (including kernel=20 > > headers version, --enable-kernel version, kernel version used at > > runtime) for which you have built glibc and run the full glibc > > testsuite? I suspect this code is pretty close to being ready to go > > in - but such patches have plenty of scope for mistakes (such as > > were in earlier RV32 patch versions) such as typos, transposed > > parameters, etc., that are hard for humans to spot reliably and > > easy for compilers and testsuites to spot, so it's important to > > know that sufficient automated tests have been run to catch any > > such mistakes.=20 >=20 > So I tested this on ARM32 QEMU BSP build with meta-y2038 [1]. >=20 > I. Build testing: > - Machine's > MACHINE=3Dqemux86-64-x32 > MACHINE=3Dqemux86-64 > MACHINE=3Dqemux86 > MACHINE=3Dqemuarm >=20 > - Using glib's > test-wrapper=3D'/opt/Y2038/glibc/src/scripts/cross-test-ssh.sh >=20 > for qemu ARM. >=20 > - ../src/scripts/build-many-glibcs.py >=20 >=20 > II. Runtime testing - with BSP [1]: > runqemu -d y2038arm nographic >=20 > - PREFERRED_VERSION_linux-y2038 =3D "5.1%" && > Y2038_GLIBC_MIN_KERNEL_VERSION=3D"5.1.0" > --enable-kernel=3D${Y2038_GLIBC_MIN_KERNEL_VERSION} >=20 > Linux y2038arm 5.1.21-y2038-4a9b1eb8bc3ba4ad8b3b1aa3317cf8d4a3aaad83 >=20 > (Support __ASSUME_TIME64_SYSCALLS defined) >=20 > - Only PREFERRED_VERSION_linux-y2038 =3D "5.1%" - the minimal kernel > version is default one for current mainline glibc >=20 > (The __ASSUME_TIME64_SYSCALLS not defined, but kernel supports > __clock_settime64 syscalls). >=20 > - PREFERRED_VERSION_linux-lts =3D "4.19%" > with default minimal kernel version for contemporary glibc > (SHA1: 87accae3978c77c1a50d19ea8e3da3f0248d2612) >=20 > This kernel doesn't support __clock_settime64 syscalls, so we > fallback to clock_settime. >=20 > Above tests are performed with Y2038 redirection applied [2] as well > as without (so the __TIMESIZE !=3D 64 execution path is checked as > well). >=20 > III. Syscalls unit tests - test_y2038 program [3] installed on BSP. >=20 > IV. For x86_64 I do run the - as I can do it on my HOST PC >=20 > make PARALLELMFLAGS=3D"-j8" && make xcheck PARALLELMFLAGS=3D"-j8" >=20 > (before and after the patchset). >=20 > > I gave a list in=20 > > of > > five configurations I think are relevant to cover the different > > cases in patches such as this ("new" =3D 5.1 or later; Florian's > > changes to provide syscall tables in glibc would allow "#ifdef > > __NR_clock_settime64" to be removed and eliminate case (b)): > >=20 > > (a) one that has always had 64-bit time, e.g. x86_64; > > =20 >=20 > Point IV. For this point I've only used make && make xcheck >=20 > > (b) one with 32-bit time and old kernel headers (any kernel version > > at runtime); =20 >=20 > Point II. >=20 > >=20 > > (c) one with 32-bit time and new kernel headers, old kernel at > > runtime; > >=20 > > (d) one with 32-bit time and new kernel headers, new kernel at > > runtime but no --enable-kernel; Point c) and d) test scenario as described: https://github.com/lmajewski/meta-y2038 > >=20 > > (e) one with 32-bit time and new kernel at runtime and new=20 > > --enable-kernel. =20 >=20 > Point II. >=20 > > =20 >=20 > I will double check if the above points are in sync with points a) to > e). >=20 > > If some of these are problematic to test, you can ask for help > > testing them. For *this particular* patch you might not need to > > test both (c) and (d), because they are identical as far as > > compilation is concerned and the testsuite doesn't really cover > > execution of clock_settime anyway. But it's in the nature of the > > Y2038 changes - involving lots of conditional code - that it's > > necessary to test in several different configurations to cover the > > conditionals adequately. =20 >=20 > QEMU (and OE/Yocto) helps here ... >=20 > >=20 > > (For avoidance of doubt, it is *not* necessary to run > > build-many-glibcs.py for this patch, and nor would running > > build-many-glibcs.py be sufficient since it doesn't do execution > > testing or cover the kernel headers version and --enable-kernel > > variants.) > > =20 >=20 > The build-many-glibcs helps with checking if there aren't some odd > build breaks. It is one of many test approaches for testing the Y2038 > problem. >=20 > Note: >=20 > [1] - https://github.com/lmajewski/meta-y2038 > [2] - > https://github.com/lmajewski/y2038_glibc/commit/1229b54508d0bb130a017a5b5= 591209167255665 > [3] - https://github.com/lmajewski/y2038-tests/commits/master >=20 > Best regards, >=20 > Lukasz Majewski >=20 > -- >=20 > 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 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_/Ch3SWsNlAM7fB.TszVHPO2J Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEgAyFJ+N6uu6+XupJAR8vZIA0zr0FAl2D+o0ACgkQAR8vZIA0 zr2WAwf9GzUKRatclCp3fhRoZ8DCF+hj8TtdG8ChpWBT8nWTGydzXqgg6xxP3nvQ qh3YI8YKWHFkW7v48/EYgnUqyBr1sPy6XaWktUojvm+eD+qbyuqfuiJMO5MHB3yv ZJCGBZhEZzJYd5PeQTs4Ldn0HbgaW0mvpYl5psE0xgj3fgv7zSqZOD2C1CPYhG8+ 0gOt/Lvqr/4eam2f/mNW4u8ejv+CTftKKAwtCUllOGlvp/a/bkEr90XQn+gYEwOp wg2oupwa9AlHJPvXbTkILv/8Bb/Z2vTiPu8pw08151hflfiCOItU7Qwe92DZnxCc teCst5uAyJWJU3zDrm8SoAsOXA50qg== =2JV9 -----END PGP SIGNATURE----- --Sig_/Ch3SWsNlAM7fB.TszVHPO2J--