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

Move coverage tests from run-make-fulldeps to run-make #83830

Closed
richkadel opened this issue Apr 3, 2021 · 1 comment
Closed

Move coverage tests from run-make-fulldeps to run-make #83830

richkadel opened this issue Apr 3, 2021 · 1 comment

Comments

@richkadel
Copy link
Contributor

I tried to do this recently and it failed. Some things to remember:

  • Search for and replace references to run-make-fulldeps
  • Update path to ../../run-make-fulldeps/tools.mk from just ../tools.mk
  • bootstrap has an explicit reference to fulldeps in test.rs to build RustDemangler and set --rust-demangler-path, which should be changed to support the move to run-make without fulldeps

I forgot about that last one and its possible that was the only issue.

If not, check bootstrap for other fulldeps dependencies, and note that the error I thought I saw had to do with llvm-profdata or llvm-cov. If so, those may require additional special handling in bootstrap or elsewhere.

richkadel added a commit to richkadel/rust that referenced this issue May 1, 2021
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue May 4, 2021
…nts, r=tmandry

Report coverage `0` of dead blocks

Fixes: rust-lang#84018

With `-Z instrument-coverage`, coverage reporting of dead blocks
(for example, blocks dropped because a conditional branch is dropped,
based on const evaluation) is now supported.

If `instrument-coverage` is enabled, `simplify::remove_dead_blocks()`
finds all dropped coverage `Statement`s and adds their `code_region`s as
`Unreachable` coverage `Statement`s to the `START_BLOCK`, so they are
still included in the coverage map.

Check out the resulting changes in the test coverage reports in this PR.

I also addressed an outstanding issue/request to move coverage tests from run-make-fulldeps to run-make (in commit 2).

Fixes: rust-lang#83830

r? `@tmandry`
cc: `@wesleywiser`
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue May 4, 2021
…nts, r=tmandry

Report coverage `0` of dead blocks

Fixes: rust-lang#84018

With `-Z instrument-coverage`, coverage reporting of dead blocks
(for example, blocks dropped because a conditional branch is dropped,
based on const evaluation) is now supported.

If `instrument-coverage` is enabled, `simplify::remove_dead_blocks()`
finds all dropped coverage `Statement`s and adds their `code_region`s as
`Unreachable` coverage `Statement`s to the `START_BLOCK`, so they are
still included in the coverage map.

Check out the resulting changes in the test coverage reports in this PR.

I also addressed an outstanding issue/request to move coverage tests from run-make-fulldeps to run-make (in commit 2).

Fixes: rust-lang#83830

r? ``@tmandry``
cc: ``@wesleywiser``
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue May 4, 2021
…nts, r=tmandry

Report coverage `0` of dead blocks

Fixes: rust-lang#84018

With `-Z instrument-coverage`, coverage reporting of dead blocks
(for example, blocks dropped because a conditional branch is dropped,
based on const evaluation) is now supported.

If `instrument-coverage` is enabled, `simplify::remove_dead_blocks()`
finds all dropped coverage `Statement`s and adds their `code_region`s as
`Unreachable` coverage `Statement`s to the `START_BLOCK`, so they are
still included in the coverage map.

Check out the resulting changes in the test coverage reports in this PR.

I also addressed an outstanding issue/request to move coverage tests from run-make-fulldeps to run-make (in commit 2).

Fixes: rust-lang#83830

r? ```@tmandry```
cc: ```@wesleywiser```
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue May 4, 2021
…nts, r=tmandry

Report coverage `0` of dead blocks

Fixes: rust-lang#84018

With `-Z instrument-coverage`, coverage reporting of dead blocks
(for example, blocks dropped because a conditional branch is dropped,
based on const evaluation) is now supported.

If `instrument-coverage` is enabled, `simplify::remove_dead_blocks()`
finds all dropped coverage `Statement`s and adds their `code_region`s as
`Unreachable` coverage `Statement`s to the `START_BLOCK`, so they are
still included in the coverage map.

Check out the resulting changes in the test coverage reports in this PR.

I also addressed an outstanding issue/request to move coverage tests from run-make-fulldeps to run-make (in commit 2).

Fixes: rust-lang#83830

r? ````@tmandry````
cc: ````@wesleywiser````
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue May 4, 2021
…nts, r=tmandry

Report coverage `0` of dead blocks

Fixes: rust-lang#84018

With `-Z instrument-coverage`, coverage reporting of dead blocks
(for example, blocks dropped because a conditional branch is dropped,
based on const evaluation) is now supported.

If `instrument-coverage` is enabled, `simplify::remove_dead_blocks()`
finds all dropped coverage `Statement`s and adds their `code_region`s as
`Unreachable` coverage `Statement`s to the `START_BLOCK`, so they are
still included in the coverage map.

Check out the resulting changes in the test coverage reports in this PR.

I also addressed an outstanding issue/request to move coverage tests from run-make-fulldeps to run-make (in commit 2).

Fixes: rust-lang#83830

r? `````@tmandry`````
cc: `````@wesleywiser`````
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue May 4, 2021
…nts, r=tmandry

Report coverage `0` of dead blocks

Fixes: rust-lang#84018

With `-Z instrument-coverage`, coverage reporting of dead blocks
(for example, blocks dropped because a conditional branch is dropped,
based on const evaluation) is now supported.

If `instrument-coverage` is enabled, `simplify::remove_dead_blocks()`
finds all dropped coverage `Statement`s and adds their `code_region`s as
`Unreachable` coverage `Statement`s to the `START_BLOCK`, so they are
still included in the coverage map.

Check out the resulting changes in the test coverage reports in this PR.

I also addressed an outstanding issue/request to move coverage tests from run-make-fulldeps to run-make (in commit 2).

Fixes: rust-lang#83830

r? ``````@tmandry``````
cc: ``````@wesleywiser``````
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue May 5, 2021
…nts, r=tmandry

Report coverage `0` of dead blocks

Fixes: rust-lang#84018

With `-Z instrument-coverage`, coverage reporting of dead blocks
(for example, blocks dropped because a conditional branch is dropped,
based on const evaluation) is now supported.

If `instrument-coverage` is enabled, `simplify::remove_dead_blocks()`
finds all dropped coverage `Statement`s and adds their `code_region`s as
`Unreachable` coverage `Statement`s to the `START_BLOCK`, so they are
still included in the coverage map.

Check out the resulting changes in the test coverage reports in this PR.

I also addressed an outstanding issue/request to move coverage tests from run-make-fulldeps to run-make (in commit 2).

Fixes: rust-lang#83830

r? ```````@tmandry```````
cc: ```````@wesleywiser```````
richkadel added a commit to richkadel/rust that referenced this issue May 7, 2021
Fixes: rust-lang#83830

The first commit was migrated from another PR that failed because CI had
errors likely resulting from trying to run the coverage tests in
run-make. (See: rust-lang#84797 (comment))

So moving the tests should be done as it's own separate PR.

To attempt to resolve those CI errors, this PR also updates bootstrap to
add LLVM library link path to run-make.

When moving coverage tests from run-make-fulldeps to run-make,
some targets failed in CI with an obscure message:

failed to execute command: "musl-g++" "-ffunction-sections"
"-fdata-sections" "-fPIC" "-m32" "-march=i686" "-Wl,-melf_i386"
"-static" "-Wa,-mrelax-relocations=no" "-print-file-name=libstdc++.a"

error: No such file or directory (os error 2)

The coverage tests include # needs-profiler-support and these are the
first run-make tests to require it (as far as I can tell).

There is a special case in bootstrap for adding the LLVM library link
path, and it applies to run-make-fulldeps. This commit adds it for
run-make as well.
@richkadel
Copy link
Contributor Author

Note that additional attempts to migrate coverage tests from run-make-fulldeps to run-make did not succeed because run-make runs on some platforms that don't support LLVM coverage profiling.

See PR #85007

I'm closing this issue as "Not Feasible" at this time.

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

Successfully merging a pull request may close this issue.

1 participant