Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5804330ybv; Wed, 12 Feb 2020 00:16:04 -0800 (PST) X-Google-Smtp-Source: APXvYqz0uS/8KAg7STY7uEVjq3k8HTHKfpgqiKByAcQsLpZ+pJckGx8rzkB03S/MDfhEs1iB0LDx X-Received: by 2002:a05:6830:22cd:: with SMTP id q13mr8510127otc.224.1581495364847; Wed, 12 Feb 2020 00:16:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581495364; cv=none; d=google.com; s=arc-20160816; b=WaygisvKvIHoVJOYbmnYNjRbfT0xV1hBMHc1WXkrekeHeQCCxkBko0+VORx2gamWrB iT1mM9nGlzvgwwDXuYau2LDYNGN6EZCUBkvmxsbN3UxBVPfv91Qa7eSqV+RXBFD7ia2j 1rKvLxDVk6f7iwEDHD7hRGgtMCBfQH9sJpcW+SR07kd+wHAQRlxGKIYzKsck/GqIsl3L 0GXmuPSFB8gfb8qA7W4k+FeGjG5QgJOOKR0mshjdNE0nU29dPAeLhZdUrOy39exSk1DW kFSJ0oXiTy4Q0/I+rrfUdMfiP837o2fJB5nb4ek99ZK8X6X11N9ZGg7N3Qvey1AJ2R6j XlaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=JC1L36gMRN0zRahMqYpZrAsFpe7na4m99SaePksQMLQ=; b=K8Rjxd65m5fOjO4+2Wq1B9mjwh8kXyrd6EwQzZVcbYm37SL1pc1tDvcFFXskuVCuCz XVjPiwn6o5XZdD1PYB3v5HRoPVQkdMa2tj17S5iOte66S4yt7GeoPAE9onH9dcNjNrru LkG/n06tZE+acnJ/rM59LJFrXrzrQLOoxEcHqHHFPshFmbtpDlfgc/QBeZlimNgtX/na 7k8EJI4+/WAKCc3r4wZ53vCJHyKyuTxhpe/wb1SlsfXYYqsJ5EGzxHJJQEC1KCdQVX6C EvWgO170xY63yVOsqY7ENOXxvM+wlT4vf4aYnb2BXglyZLX+vLGUlfM9VN5G7lu7fSbl DHuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o13si3378732otp.27.2020.02.12.00.15.53; Wed, 12 Feb 2020 00:16:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728533AbgBLIOi (ORCPT + 99 others); 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--