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

tests/test_edgesec.c code-coverage is inconsistent #435

Closed
aloisklink opened this issue Feb 21, 2023 · 1 comment · Fixed by #473
Closed

tests/test_edgesec.c code-coverage is inconsistent #435

aloisklink opened this issue Feb 21, 2023 · 1 comment · Fixed by #473
Assignees
Labels
bug Something isn't working

Comments

@aloisklink
Copy link
Contributor

Describe the bug

tests/test_edgesec.c code-coverage is inconsistent.

As an example, see #434 (comment).

This PR doesn't change anything in tests/test_edgesec.c, but somehow tests/test_edgesec.c had a code-coverage change. This is consistently happening with our PRs, which is a bit annoying, since we sometimes get a false-positive ❌ saying that the code-coverage got worse, but it turns out it's just tests/test_edgesec.c

Expected behavior

tests/test_edgesec.c code-coverage is consistent.

Screenshots

image

Additional context

It looks like the issue is this line:

I'm guessing maybe some of the CI compilers might be using a different version of gcc that uses different optimisation? I have a WIP commit that will test this branch, which should fix this issue, see 80e1ee7

@aloisklink aloisklink added the bug Something isn't working label Feb 21, 2023
@aloisklink aloisklink self-assigned this Feb 21, 2023
@aloisklink
Copy link
Contributor Author

It looks like this is still an issue, as of dd4f7a6.

The issue seems to be that when GCC outputs the tracefile showing the code-coverage, it ignores this line, because it has no assembly associated with it:

However, when Clang outputs their tracefile for code-coverage, it doesn't ignore this line.

The following line of code (the branch above the } else { line) is tested but only on the OpenWRT test preset, which only uses GCC.

log_trace("RECEIVED ATTACH");

I think if we test this branch in Clang too, this should fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant