From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) by sourceware.org (Postfix) with ESMTPS id 7E6913858C52 for ; Wed, 24 May 2023 07:16:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7E6913858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-19674cab442so502576fac.3 for ; Wed, 24 May 2023 00:16:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684912560; x=1687504560; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=0s73g2YaRReFwtDKqj4j60dPeGze7wkkTtDtrksR28Q=; b=SglMG/gVbYx8ZQcHz8pJacZ8pRCiQgG1xs7VkznLQ0NBHSx2NJjSVYWuWxRRyF7bl2 PL98KzJ/X2uSu+RdN8VN4vER3vGq8SNSd563KtAvr6SXTaXlgCx1jaMEoo8sarp7nhhy 3Csc8JETFZmvmkzXZ/3FkpKFUVBPVTH9oYGl338Xp8pM/lxXOofRfiag5eBqhojFiwfL QTfm2Z9NjIxA71YK3UTVHx4aWGcoTd7SRdRE5Yky/aa4Yh2H0CXtMOHmY8BvswWdnpeS WmYt07vpgJCq5P7CCaEYGR9GL0Kuust/RL9v/ewlYAndVJo5CAVFns9cOOiyDgLK2sMA UGCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684912560; x=1687504560; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0s73g2YaRReFwtDKqj4j60dPeGze7wkkTtDtrksR28Q=; b=lKb1UiqEomrsx/vzCDJ9DHZLOBo3IZZamba5kH7INMCe8qSXVOD8YikJBn2YoopwSk CWCigzVom2Ce0M09gE88gJlETOG4f6+r2Du6qhRSSE6zACT4a/gAJIKbfYUQNcZvhrMM u4x/cEkb2VHL/rbQYDapBRTXzjub66L37fAnm/nxMNKyMV8kcOQdexgAX6VfIfeXuaho 2Y4+WyM4vBuTH5icmWGl9V+zVhEasfv0MUEa+1MfS/H9pNX0mwr7RK+Z7i98ZMydOiY0 Fx+vzDDBCytwgGCR7o9oBJ7EjRodNPZHPpc0N+1ldg8TOjsRjii6AvmK4SXI3QU0udmW MVhQ== X-Gm-Message-State: AC+VfDyUoMh+m08h4mgVzGzt1fYTUC2l5kW0gT2oqWy0hdZvqvs7I89B eGBb+y4lV9OQbvccFoUaaw4j4OHVvb2If+zD3PkmY6tuYBs= X-Google-Smtp-Source: ACHHUZ7ZSOB5ZZVwP4KvAvpcIOsYt6+QRpwAytw4lO85RTtIqO3e9YBUD2I40jAClYYzSdzLRztcWh8Nt8UM75iIl38= X-Received: by 2002:a05:6870:6247:b0:184:42a2:cad1 with SMTP id r7-20020a056870624700b0018442a2cad1mr7565316oak.44.1684912559659; Wed, 24 May 2023 00:15:59 -0700 (PDT) MIME-Version: 1.0 References: <20230520182125.3986459-1-bugaevc@gmail.com> <2ee46c72-ea05-b45b-0848-30f31a2696ac@linaro.org> <734a454a-8948-e5c3-2ef3-acd216461cc2@linaro.org> In-Reply-To: <734a454a-8948-e5c3-2ef3-acd216461cc2@linaro.org> From: Sergey Bugaev Date: Wed, 24 May 2023 10:15:48 +0300 Message-ID: Subject: Re: [RFC PATCH] debug: Add tests for fortified fcntl () To: Adhemerval Zanella Netto Cc: libc-alpha@sourceware.org, Joseph Myers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hello, On Tue, May 23, 2023 at 10:49=E2=80=AFPM Adhemerval Zanella Netto wrote: > The __fnctl is not provided in all build configurations, so debug tests > fail to build: > > debug/tst-fortify-cc-default-1-def.o: > > ./tst-fortify.c:1800:9: error: =E2=80=98__fcntl=E2=80=99 was not declared= in this scope; did you mean =E2=80=98fcntl=E2=80=99? > 1800 | res =3D __fcntl (lockfd1, F_OFD_GETLK, &flock); > | ^~~~~~~ > | fcntl I see, thanks :| > But we already have different tests for non-LFS and LFS on debug, > so any issue will be reported a test failure (including wrong > fortification redirection). Could you please point out which tests you're talking about? I've only seen tst-fortify get built/checked in all the various configurations (_FORTIFY_SOURCE or not, _GNU_SOURCE or not, _FILE_OFFSET_BITS=3D64 or not, _LARGEFILE64_SOURCE or not). > > So, with this in mind, should I be using __fcntl here, or is there a > > better option? > > I think a better option would to move the kernel probe support to libsupp= ort > and call it instead. That makes a lot of sense, will do, thanks. Sergey