Skip to content

Commit 172a128

Browse files
committed
Reduce false positives for prefixes from audit
Some tar ball have a `metadata.log` file where the user specified the prefix using either a leading or a trailing slash (or both). We remove those slashes first before comparing against the actual prefix found.
1 parent 4d751cf commit 172a128

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/bin/pbench-audit-server.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,9 @@ function verify_results {
360360
prefix_file="$ARCHIVE/${controller}/.prefix/${tb}.prefix"
361361
# Version 002 agents use the metadata log to store a
362362
# prefix.
363-
prefix=$(getconf.py -C $INCOMING/${controller}/${tb}/metadata.log prefix run)
363+
__prefix=$(getconf.py -C $INCOMING/${controller}/${tb}/metadata.log prefix run)
364+
_prefix=${__prefix#/}
365+
prefix=${_prefix%/}
364366
if [[ "${prefix_path}" == "." ]]; then
365367
# No prefix, ensure it doesn't have a prefix in the
366368
# metadata.log file or in a prefix file.

0 commit comments

Comments
 (0)