Skip to content

section could not be matched when sectionFileName="/xxx/../xx" #351

@agfn

Description

@agfn

Describe the bug

When sectionFileName inlcov.info file contains .., function checkSectionAbsolute (used to match coverage section and source file) does not work correctly.

To Reproduce
Steps to reproduce the behaviour:

  1. lcov.info contains the follow content:
SF:/home/lt/projects/libfuzz/json-c/build/../arraylist.c
FN:40,array_list_new
FN:45,array_list_new2
FN:65,array_list_free
FN:75,array_list_get_idx
FN:107,array_list_shrink
FN:130,array_list_put_idx
...
end_of_record
  1. Then, you will found json-c/arraylist.c file will be marked as "No Coverage". Because checkSectionAbsolute only check suffix, and
    sectionFileName is not simplified absolute path.

Expected behaviour

Screenshots

image

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Extension Version: github master brach
  • VSCode Version 1.62.0

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions