scripts: documentation-file-ref-check: fix bpf selftests path
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 19 Oct 2021 07:42:51 +0000 (08:42 +0100)
committerJonathan Corbet <corbet@lwn.net>
Tue, 26 Oct 2021 15:42:29 +0000 (09:42 -0600)
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 <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/49b765cbac6ccd22d627573154806ec9389d60f0.1634629094.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
scripts/documentation-file-ref-check

index 6865d8e63d5c88cfb87a0bfff84365472a0ab4c7..68083f2f112205b902e48e5cabb9ec9027276a41 100755 (executable)
@@ -147,6 +147,7 @@ while (<IN>) {
                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"));
                }