Skip to content

Commit 3b378b0

Browse files
committed
geninfo: Fix errors while resolving /././ path components
Trying to collect code coverage data for source code that contains repeat ./ references in a path components fails with the following error message: geninfo: WARNING: cannot find an entry for <name>.gcov in .gcno file, skipping file! This is caused by a bug in path normalization function solve_relative_path() that does not correctly process adjacent ./ references. Fix this by repeating the resolution of ./ references in path components. Signed-off-by: Peter Oberparleiter <[email protected]> Reported-by: Joshua Cranmer
1 parent 42b55f5 commit 3b378b0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/geninfo

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1489,7 +1489,9 @@ sub solve_relative_path($$)
14891489
$result =~ s/\/\//\//g;
14901490

14911491
# Remove .
1492-
$result =~ s/\/\.\//\//g;
1492+
while ($result =~ s/\/\.\//\//g)
1493+
{
1494+
}
14931495
$result =~ s/\/\.$/\//g;
14941496

14951497
# Remove trailing /

0 commit comments

Comments
 (0)