diff --git a/scripts/documentation-file-ref-check b/scripts/documentation-file-ref-check
index 6865d8e63d5c88cfb87a0bfff84365472a0ab4c7..68083f2f112205b902e48e5cabb9ec9027276a41 100755
--- a/scripts/documentation-file-ref-check
+++ b/scripts/documentation-file-ref-check
@@ -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"));
 		}