Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bash: kcov misses lines in a eval'd subshell #89

Open
Mark-E-Hamilton opened this issue Apr 29, 2015 · 2 comments
Open

bash: kcov misses lines in a eval'd subshell #89

Mark-E-Hamilton opened this issue Apr 29, 2015 · 2 comments
Labels

Comments

@Mark-E-Hamilton
Copy link

Thanks for the continued prompt responses. This issue might be a repeat, but I've submitted so many I've gotten lost. I apologize if it is.

IAE, with this test case

#/bin/bash
eval "(echo Stuff in subshell
echo More stuff in subshell
      ) "
echo "Inbetween stuff"
(echo "Other subshell"
echo More stuff in Other subshell
)

All lines in this script are executed. However, the first two lines in the eval'd subshell are reported as uncovered. The last line (with the closing paren) is marked as covered.

OTOH, the first two lines in the second subshell are shown as covered, and the line with the closing paren is marked as uncovered.

@SimonKagstrom
Copy link
Owner

I'll start looking for that yacc grammar now :-)

Anyway, sometimes bash reports the executed line a bit strangely, like on the terminating parenthesis. This might be one of those cases, and if so probably the lines above should be marked as no-code.

SimonKagstrom added a commit that referenced this issue Apr 30, 2015
@SimonKagstrom
Copy link
Owner

Commit 2a450ed belongs to Issue #90, sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants