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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 12F3FC43219 for ; Thu, 16 Sep 2021 12:13:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E8A5460F4A for ; Thu, 16 Sep 2021 12:13:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239426AbhIPMOW (ORCPT ); Thu, 16 Sep 2021 08:14:22 -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-Google-Smtp-Source: ABdhPJzjhJgO8cFIT2GipL1pyLBESTYNhG5MXheT1l5nRxXPi6XFjSoeUvTa4kKMZP8Y/iAwUO0X0A== 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