Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1326011pxb; Thu, 16 Sep 2021 05:14:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKwJgLJ7KrRu/XKmfyp4IdepvXvozFiDIjCxAz/6WZi4CDeYV/6ik6kH2hi1zRe2WAc6xJ X-Received: by 2002:a92:c612:: with SMTP id p18mr3620906ilm.123.1631794440663; Thu, 16 Sep 2021 05:14:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631794440; cv=none; d=google.com; s=arc-20160816; b=TOc43V2VmpotLiirtkrCXspU/wdjA81QfDpFdQmwJNOFjzRyHbaw1RcQZUHfz3DJtZ 55eEg0MVraUeLnB2VBaYswsahb0NVpvi8eDJeHUs+UTnCLp8HQny/reKOGDUVrMQf/YH o4mTzNCYoLAyPvWH9AYwNCZ/BGUeaFEQHx/J/GTP9ND3ux/wTBrbKK5/DqTSYqYOg2QU 4rS65es9JEeG9hSqwHNQxyyyRcSbkDoBC2N3HJhhyt0/yH7hJB4QW2FnGFq9kSlQ6mq4 hmnoX0w2AoeWvp3ej5r+DIXe4anreYEzzkHH76M8YqlVpbQM0MljEbMN+gU1St2KA6OA 7trg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=nAa7hcN3ascpVQvM2OTeR2k2GxYPakXsr5xj8Xor+Lw=; b=w/fTQa1mhATpVfljCFYdnBUi/2+6/ZfMDF7EcucJuiIMiHPlpwuvJVXkIsk1GLAuYa rOghfHBNSITgpY/YDzyCzFQo8iNiei52BGjNXZ7Jwed9JjPMo0ZxDHSLBHoTNt69QDr9 jl3HEBrSo8J1TC0j+uUz0tbaZi9XSrp8gT7AophRtUmQ3yCUk1ifU6Sbq3mm4qpT633p 3CUOxwp2poW0poXYpXs5K7xRoHy4NaWZiulmYMGuJ9nK3qhPAWe70nhu5yxkcnHhLrlj pucWZEV761ZBNNQEz/Lkbbqw510MWZJtPmZuv4qSZkucsrteoRYEGfisY0N3zclcBFYH cdgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@isovalent-com.20210112.gappssmtp.com header.s=20210112 header.b="WmD/Z3+n"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c8si2481811iot.67.2021.09.16.05.13.45; Thu, 16 Sep 2021 05:14:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@isovalent-com.20210112.gappssmtp.com header.s=20210112 header.b="WmD/Z3+n"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239416AbhIPMOV (ORCPT + 99 others); Thu, 16 Sep 2021 08:14:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239393AbhIPMOU (ORCPT ); Thu, 16 Sep 2021 08:14:20 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75D40C061574 for ; Thu, 16 Sep 2021 05:13:00 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id g16so9134837wrb.3 for ; Thu, 16 Sep 2021 05:13:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=isovalent-com.20210112.gappssmtp.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=nAa7hcN3ascpVQvM2OTeR2k2GxYPakXsr5xj8Xor+Lw=; b=WmD/Z3+ncYgIZPTkselMJKRJwFC5I8QlynB+q8Lx4A4w+1BwjPde8V+HFZ6T61d3Z0 WKVnlly6gf/xyNqeuOpkTGnrKuo3Nxcf/0+NI5UBolir1q1MWuUtuIz/RXfmU9IeW4lo Wn1ilNGM56xVE7XDbRQu4sBu+57OlID40Z97fV41DuOiSZVTetL3kTj2ZwthotdFdH/Q SXUKvUGfvyzlorYs+n55BkMW476UbDatDv318GaIiqZLzQesajEooYAG0rOQ92vePetd EhyWlX87ZPx152HdnX8/byXkwQz6eKseOdCyzYZYo0y2pwUyJfEPx4ro/AcoWJzqDAQt ERWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=nAa7hcN3ascpVQvM2OTeR2k2GxYPakXsr5xj8Xor+Lw=; b=wS88V46c/wvL9yZW5/GjBVjwL/aRk3ji7Jk5/9Z0J2QEYoiOjU/O9jsnfLEtIJ+aJq m/8rSguGJToKdXiiU0SwcYmYQuux9oCBZ4MCFnvEwMONm+zounEjrehRVveHVy6p+SQU 8S9YaZY8b/P+kXRAqtx0VPRNkjdlHW5QVeOFsoPBHs7zHh6n8XWZfRcgWgCtpcM+rTry Xhlnm1Ut11qqNLt8K02qXJ+lefTLrEPW/xrjA43/25Zsg8f3yhH8SqX0swsrCZcva6vS RcxFM3I7uXR7pmOXVgE1xkOphmpt9W1nJfWRq+BX/74p8EFRYzuoDiWYF1BN9+HFsNKf EuJA== X-Gm-Message-State: AOAM533fvEFGFusBPqm23cNAfIVDpgqZVzxMXaJCJVLg+G4ILqgMxEAi C2xeUbn5gyGa/J1bxfocIe8kIA== X-Received: by 2002:a5d:64ea:: with SMTP id g10mr2658238wri.274.1631794379049; Thu, 16 Sep 2021 05:12:59 -0700 (PDT) Received: from [192.168.1.8] ([149.86.87.95]) by smtp.gmail.com with ESMTPSA id m29sm3450939wrb.89.2021.09.16.05.12.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Sep 2021 05:12:58 -0700 (PDT) Subject: Re: [PATCH 08/24] tools: bpftool: update bpftool-prog.rst reference To: Mauro Carvalho Chehab Cc: Linux Doc Mailing List , Jonathan Corbet , "David S. Miller" , Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , David Beckett , Jakub Kicinski , John Fastabend , KP Singh , Martin KaFai Lau , Shuah Khan , Song Liu , Yonghong Song , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, netdev@vger.kernel.org References: <20210916124930.7ae3b722@coco.lan> <33d66a49-2fc0-57a1-c1e5-34e932bcc237@isovalent.com> <20210916133036.37c50383@coco.lan> From: Quentin Monnet Message-ID: <8d5eaebb-29ac-5ee6-20ec-09d30d33dd73@isovalent.com> Date: Thu, 16 Sep 2021 13:12:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20210916133036.37c50383@coco.lan> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2021-09-16 13:30 UTC+0200 ~ Mauro Carvalho Chehab > [PATCH] scripts: documentation-file-ref-check: fix bpf selftests path > > tools/testing/selftests/bpf/test_bpftool_synctypes.py use > relative patches on the top of BPFTOOL_DIR: > > BPFTOOL_DIR = os.path.join(LINUX_ROOT, 'tools/bpf/bpftool') > > Change the script to automatically convert: > > testing/selftests/bpf -> bpf/bpftool > > In order to properly check the files used by such script. > > Signed-off-by: Mauro Carvalho Chehab > > diff --git a/scripts/documentation-file-ref-check b/scripts/documentation-file-ref-check > index 7187ea5e5149..2d91cfe11cd2 100755 > --- a/scripts/documentation-file-ref-check > +++ b/scripts/documentation-file-ref-check > @@ -144,6 +144,7 @@ while () { > if ($f =~ m/tools/) { > my $path = $f; > $path =~ s,(.*)/.*,$1,; > + $path =~ s,testing/selftests/bpf,bpf/bpftool,; > next if (grep -e, glob("$path/$ref $path/../$ref $path/$fulref")); > } > > > > I tested the patch and it works well on my side. However, this looks a bit fragile to me. There is no particular reason to have testing/selftests/bpf point to bpf/bpftool other than to accommodate the current case, we could imagine other selftest files pointing to other parts of the documentation in the future. I would instead make an exception for test_bpftool_synctypes.py specifically (other selftest files don't usually parse documentation anyway). Alternatively, I would look at excluding lines where the path is used in code (tricky to detect), maybe at least when used with os.path.join(): next if ($ln =~ m,os\.path\.join\([^\,]*\,\s*['"]$fulref,); But I'm not familiar with documentation-file-ref-check in the first place, so these are just my two cents. Thanks, Quentin