summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorBenjamin Poirier <bpoirier@nvidia.com>2024-01-27 02:21:22 +0300
committerDavid S. Miller <davem@davemloft.net>2024-01-31 13:55:11 +0300
commit9f2af915916b49f2f3a0285cae805a33c2a1dde3 (patch)
tree40db3791dbbf3e7edef39795d4c50946fb50db92 /tools/perf/scripts/python/stackcollapse.py
parent4a24560ad72f8febfa4e11cad63fbf24ac94c008 (diff)
downloadlinux-9f2af915916b49f2f3a0285cae805a33c2a1dde3.tar.xz
selftests: forwarding: Redefine relative_path variable
The following code which is part of lib.sh: relative_path="${BASH_SOURCE%/*}" if [[ "$relative_path" == "${BASH_SOURCE}" ]]; then relative_path="." fi reimplements functionality that is part of `dirname`: $ dirname "" . To avoid this duplication, replace "relative_path" by "net_forwarding_dir", a new variable defined using dirname. Furthermore, to avoid the potential confusion about what "relative_path" is about (cwd, test script directory or test library directory), define "net_forwarding_dir" as the absolute path to net/forwarding/. Tested-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Hangbin Liu <liuhangbin@gmail.com> Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions