Skip to content

are spaces in filenames meant to work? #384

@xaxazak

Description

@xaxazak

Capturing initial zero coverage fails if a .gcno file has a space in it. I'm guessing it'll fail elsewhere too but I haven't got to testing that yet.

Here's a script that demonstrates the issue.
mkdir -pv ./mytest;
echo "int main(){}" > ./mytest/main.cpp;
gcc -c -o ./mytest/main.o ./mytest/main.cpp -fprofile-arcs -ftest-coverage "-fprofile-note=./mytest/lhs rhs.gcno";
lcov --capture -i -o ./mytest/zeroes.info -d ./mytest

Replacing "lhs rhs.gcno" with "nospaces.gcno" fixes it.
gcc -c -o ./mytest/main.o ./mytest/main.cpp -fprofile-arcs -ftest-coverage -fprofile-note=./mytest/nospaces.gcno;

What's wierd is the error - it removes the part of the filename before the space, not after it.
lcov: ERROR: (path) ERROR: Could not copy file [SCRUBBED]/dev/rhs.gcno: No such file or directory!

note: dev here is the parent folder and CWD, but the actual gcno path of the existing file is [SCRUBBED]/dev/mytest/lhs rhs.gcno.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions