From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81A33C352A4 for ; Wed, 12 Feb 2020 08:14:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5F5A520714 for ; Wed, 12 Feb 2020 08:14:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728538AbgBLIOi (ORCPT ); Wed, 12 Feb 2020 03:14:38 -0500 Received: from mout-p-202.mailbox.org ([80.241.56.172]:30266 "EHLO mout-p-202.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728410AbgBLIOi (ORCPT ); Wed, 12 Feb 2020 03:14:38 -0500 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 48HXVg31rGzQlDK; Wed, 12 Feb 2020 09:14:35 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id d6fAeFS6_2E4; Wed, 12 Feb 2020 09:14:29 +0100 (CET) Date: Wed, 12 Feb 2020 19:14:14 +1100 From: Aleksa Sarai To: shuah Cc: linux-kselftest@vger.kernel.org, Linux Kernel Mailing List , Dmitry Safonov Subject: Re: Linux 5.6-rc1 kselftest build failures Message-ID: <20200212081414.7bwkndf6qxg2p35a@yavin> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xhe55iz3x7b3lfsi" Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --xhe55iz3x7b3lfsi Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-02-11, shuah wrote: > openat2: >=20 > tools/testing/selftests/openat2' > gcc -Wall -O2 -g -fsanitize=3Daddress -fsanitize=3Dundefined openat2_test= =2Ec > helpers.c -o tools/testing/selftests/openat2/openat2_test > In file included from /usr/include/fcntl.h:301, > from helpers.c:9: > In function =E2=80=98openat=E2=80=99, > inlined from =E2=80=98touchat=E2=80=99 at helpers.c:49:11: > /usr/include/x86_64-linux-gnu/bits/fcntl2.h:126:4: error: call to > =E2=80=98__openat_missing_mode=E2=80=99 declared with attribute error: op= enat with O_CREAT > or O_TMPFILE in third argument needs 4 arguments > 126 | __openat_missing_mode (); > | ^~~~~~~~~~~~~~~~~~~~~~~~ Yeah, that's a brain-o -- it looks like you have a newer glibc than me which gives you a warning when you don't set the mode. The fix should be just the following: --8<----------------------------------------------------------------------- Subject: [PATCH] selftests: openat2: fix build error on newer glibc It appears that newer glibcs check that openat(O_CREAT) was provided a fourth argument (rather than passing garbage), resulting in the following build error: In file included from /usr/include/fcntl.h:301, from helpers.c:9: In function =E2=80=98openat=E2=80=99, inlined from =E2=80=98touchat=E2=80=99 at helpers.c:49:11: /usr/include/x86_64-linux-gnu/bits/fcntl2.h:126:4: error: call to =E2=80=98__openat_missing_mode=E2=80=99 declared with attribute error: op= enat with O_CREAT or O_TMPFILE in third argument needs 4 arguments 126 | __openat_missing_mode (); | ^~~~~~~~~~~~~~~~~~~~~~~~ Reported-by: Shuah Khan Signed-off-by: Aleksa Sarai --- tools/testing/selftests/openat2/helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/openat2/helpers.c b/tools/testing/self= tests/openat2/helpers.c index e9a6557ab16f..5074681ffdc9 100644 --- a/tools/testing/selftests/openat2/helpers.c +++ b/tools/testing/selftests/openat2/helpers.c @@ -46,7 +46,7 @@ int sys_renameat2(int olddirfd, const char *oldpath, =20 int touchat(int dfd, const char *path) { - int fd =3D openat(dfd, path, O_CREAT); + int fd =3D openat(dfd, path, O_CREAT, 0700); if (fd >=3D 0) close(fd); return fd; --=20 2.25.0 --xhe55iz3x7b3lfsi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQSxZm6dtfE8gxLLfYqdlLljIbnQEgUCXkOzzwAKCRCdlLljIbnQ EraKAQC/qMKYRdSDHKJDWUIVTk4FHJi8YDwEcnu4LjqgbyslhwD/TgRqDCBjUmG4 DYIqXhuIMKKZchvwgGkdIRL6Kdua2wk= =XJmq -----END PGP SIGNATURE----- --xhe55iz3x7b3lfsi--