kernel_optimize_test/scripts
Joe Perches e33c9fe8b8 get_maintainer: fix unexpected behavior for path/to//file (double slashes)
get_maintainer behaves differently if there is a double sequential forward
slash in a filename because the total number of slashes in a filename is
used to match MAINTAINERS file patterns.

For example:

(with double slash)
  $ ./scripts/get_maintainer.pl -f drivers/gpu/drm//lima
  David Airlie <airlied@linux.ie> (maintainer:DRM DRIVERS)
  Daniel Vetter <daniel@ffwll.ch> (maintainer:DRM DRIVERS,commit_signer:3/42=7%)
  Qiang Yu <yuq825@gmail.com> (commit_signer:36/42=86%,authored:24/42=57%)
  Vasily Khoruzhick <anarsoul@gmail.com> (commit_signer:26/42=62%)
  Krzysztof Kozlowski <krzk@kernel.org> (commit_signer:5/42=12%,authored:5/42=12%)
  Emil Velikov <emil.velikov@collabora.com> (commit_signer:4/42=10%)
  dri-devel@lists.freedesktop.org (open list:DRM DRIVERS)
  linux-kernel@vger.kernel.org (open list)

(without double slash)
  $ ./scripts/get_maintainer.pl -f drivers/gpu/drm/lima
  Qiang Yu <yuq825@gmail.com> (maintainer:DRM DRIVERS FOR LIMA)
  David Airlie <airlied@linux.ie> (maintainer:DRM DRIVERS)
  Daniel Vetter <daniel@ffwll.ch> (maintainer:DRM DRIVERS)
  dri-devel@lists.freedesktop.org (open list:DRM DRIVERS FOR LIMA)
  lima@lists.freedesktop.org (moderated list:DRM DRIVERS FOR LIMA)
  linux-kernel@vger.kernel.org (open list)

So reduce consecutive double slashes to a single slash
by using File::Spec->canonpath().

from: https://perldoc.perl.org/File/Spec/Unix.html

canonpath()

No physical check on the filesystem, but a logical cleanup of a path.  On
UNIX eliminates successive slashes and successive "/.".

Reported-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/9a18b611813bb409fef15bc8927adab79eb9be43.camel@perches.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-06-04 19:06:24 -07:00
..
atomic
basic
coccinelle net: remove newlines in NL_SET_ERR_MSG_MOD 2020-05-07 17:56:14 -07:00
dtc kbuild: check libyaml installation for 'make dt_binding_check' 2020-04-17 10:45:23 -05:00
dummy-tools kbuild: add dummy toolchains to enable all cc-option etc. in Kconfig 2020-04-09 00:13:45 +09:00
gcc-plugins gcc-common.h: Update for GCC 10 2020-04-13 10:19:20 -07:00
gdb scripts/gdb: repair rb_first() and rb_last() 2020-05-07 19:27:20 -07:00
genksyms
kconfig kconfig: qconf: Fix a few alignment issues 2020-04-09 00:13:45 +09:00
ksymoops
mod Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-06-03 16:27:18 -07:00
package
selinux
tracing
.gitignore
adjust_autoksyms.sh
asn1_compiler.c
bin2c.c
bloat-o-meter
bootgraph.pl
bpf_helpers_doc.py bpf: Minor fixes to BPF helpers documentation 2020-05-11 21:20:53 +02:00
cc-can-link.sh
check_extable.sh
check-sysctl-docs
checkincludes.pl
checkkconfigsymbols.py
checkpatch.pl Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-05-31 17:48:46 -07:00
checkstack.pl
checksyscalls.sh
checkversion.pl
clang-version.sh
cleanfile
cleanpatch
coccicheck
config scripts/config: allow colons in option strings for sed 2020-04-23 01:10:16 +09:00
const_structs.checkpatch
decode_stacktrace.sh
decodecode scripts/decodecode: fix trapping instruction formatting 2020-05-07 19:27:20 -07:00
depmod.sh
diffconfig
documentation-file-ref-check scripts: documentation-file-ref-check: Add line break before exit 2020-04-15 15:13:13 -06:00
export_report.pl
extract_xc3028.pl
extract-cert.c
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
faddr2line
file-size.sh
find-unused-docs.sh
gcc-goto.sh
gcc-ld
gcc-plugin.sh gcc-plugins: drop support for GCC <= 4.7 2020-04-09 00:13:45 +09:00
gcc-version.sh
gcc-x86_32-has-stack-protector.sh
gcc-x86_64-has-stack-protector.sh
gen_autoksyms.sh
gen_compile_commands.py
gen_ksymdeps.sh
get_abi.pl
get_dvb_firmware
get_maintainer.pl get_maintainer: fix unexpected behavior for path/to//file (double slashes) 2020-06-04 19:06:24 -07:00
gfp-translate
headerdep.pl
headers_check.pl
headers_install.sh
insert-sys-cert.c
jobserver-exec
kallsyms.c gcc-10 warnings: fix low-hanging fruit 2020-05-04 09:16:37 -07:00
Kbuild.include
Kconfig.include gcc-plugins: drop support for GCC <= 4.7 2020-04-09 00:13:45 +09:00
kernel-doc scripts: kernel-doc: accept blank lines on parameter description 2020-04-20 15:35:58 -06:00
ld-version.sh
leaking_addresses.pl
Lindent
link-vmlinux.sh kbuild/objtool: Add objtool-vmlinux.o pass 2020-04-22 10:53:51 +02:00
Makefile kbuild: remove -I$(srctree)/tools/include from scripts/Makefile 2020-04-09 00:13:45 +09:00
Makefile.asm-generic
Makefile.build kbuild: link lib-y objects to vmlinux forcibly when CONFIG_MODULES=y 2020-04-09 00:13:45 +09:00
Makefile.clean gcc-plugins: drop support for GCC <= 4.7 2020-04-09 00:13:45 +09:00
Makefile.dtbinst
Makefile.extrawarn kbuild: Enable -Wtautological-compare 2020-04-09 00:13:45 +09:00
Makefile.gcc-plugins
Makefile.headersinst
Makefile.host gcc-plugins: drop support for GCC <= 4.7 2020-04-09 00:13:45 +09:00
Makefile.kasan
Makefile.kcov
Makefile.lib kbuild: fix DT binding schema rule again to avoid needless rebuilds 2020-04-23 10:50:26 +09:00
Makefile.modfinal
Makefile.modinst
Makefile.modpost
Makefile.modsign
Makefile.package
Makefile.ubsan ubsan: split "bounds" checker from other options 2020-04-07 10:43:44 -07:00
makelst
markup_oops.pl
mkcompile_h kbuild: mkcompile_h: Include $LD version in /proc/version 2020-04-09 00:13:45 +09:00
mkmakefile
mksysmap
mkuboot.sh
module-common.lds
modules-check.sh
namespace.pl
nsdeps
objdiff
parse-maintainers.pl
patch-kernel
profile2linkerlist.pl
prune-kernel
recordmcount.c
recordmcount.h
recordmcount.pl
setlocalversion
show_delta
sign-file.c
sorttable.c
sorttable.h
spdxcheck-test.sh
spdxcheck.py
spelling.txt
sphinx-pre-install scripts: sphinx-pre-install: change the output order 2020-04-28 12:52:52 -06:00
split-man.pl
stackdelta
stackusage
subarch.include
tags.sh
tools-support-relr.sh
unifdef.c
ver_linux
xen-hypercalls.sh
xz_wrap.sh