Link test binaries statically when run coverage#39354
Merged
phlax merged 1 commit intoenvoyproxy:mainfrom May 6, 2025
Merged
Conversation
Static linking helps to work around the issue with LLVM/Clang source-based coverage (see llvm/llvm-project#32849). This PR switches to static linking for just test coverage and does not do the same for fuzz coverage. That's because Envoy CI is hitting some resource constraints when building fuzz targets with coverage instrumentation. We will fix that by striping the fuzz targets of some unncessary dependencies and switching to EngFlow backend for coverage builds and tests, but that will require addressing a couple of hard to understand issues, so, for now, I'm just switching the coverage tests to static linking and will follow up with the fuzz tests later once we addressed all the blockers and switched to EngFlow backend for coverage. Signed-off-by: Mikhail Krinkin <mkrinkin@microsoft.com>
phlax
pushed a commit
to phlax/envoy
that referenced
this pull request
Jun 11, 2025
Static linking helps to work around the issue with LLVM/Clang source-based coverage (see llvm/llvm-project#32849). On the flip side, the coverage build and test run will take a bit longer (e.g., around 30m) with this change. This PR switches to static linking for just test coverage and does not do the same for fuzz coverage. That's because Envoy CI is hitting some resource constraints when building fuzz targets with coverage instrumentation. We will fix that by striping the fuzz targets of some unncessary dependencies and switching to EngFlow backend for coverage builds and tests, but that will require addressing a couple of hard to understand issues, so, for now, I'm just switching the coverage tests to static linking and will follow up with the fuzz tests later once we addressed all the blockers and switched to EngFlow backend for coverage. Additional Description: envoyproxy#39030 provides some context for EngFlow migration and envoyproxy#39248 is a tracking bug. Signed-off-by: Mikhail Krinkin <mkrinkin@microsoft.com>
phlax
pushed a commit
to phlax/envoy
that referenced
this pull request
Jun 11, 2025
Static linking helps to work around the issue with LLVM/Clang source-based coverage (see llvm/llvm-project#32849). On the flip side, the coverage build and test run will take a bit longer (e.g., around 30m) with this change. This PR switches to static linking for just test coverage and does not do the same for fuzz coverage. That's because Envoy CI is hitting some resource constraints when building fuzz targets with coverage instrumentation. We will fix that by striping the fuzz targets of some unncessary dependencies and switching to EngFlow backend for coverage builds and tests, but that will require addressing a couple of hard to understand issues, so, for now, I'm just switching the coverage tests to static linking and will follow up with the fuzz tests later once we addressed all the blockers and switched to EngFlow backend for coverage. Additional Description: envoyproxy#39030 provides some context for EngFlow migration and envoyproxy#39248 is a tracking bug. Signed-off-by: Mikhail Krinkin <mkrinkin@microsoft.com> Signed-off-by: Ryan Northey <ryan@synca.io>
phlax
pushed a commit
that referenced
this pull request
Jun 11, 2025
Static linking helps to work around the issue with LLVM/Clang source-based coverage (see llvm/llvm-project#32849). On the flip side, the coverage build and test run will take a bit longer (e.g., around 30m) with this change. This PR switches to static linking for just test coverage and does not do the same for fuzz coverage. That's because Envoy CI is hitting some resource constraints when building fuzz targets with coverage instrumentation. We will fix that by striping the fuzz targets of some unncessary dependencies and switching to EngFlow backend for coverage builds and tests, but that will require addressing a couple of hard to understand issues, so, for now, I'm just switching the coverage tests to static linking and will follow up with the fuzz tests later once we addressed all the blockers and switched to EngFlow backend for coverage. Additional Description: #39030 provides some context for EngFlow migration and #39248 is a tracking bug. Signed-off-by: Mikhail Krinkin <mkrinkin@microsoft.com> Signed-off-by: Ryan Northey <ryan@synca.io>
phlax
pushed a commit
to phlax/envoy
that referenced
this pull request
Jun 11, 2025
Static linking helps to work around the issue with LLVM/Clang source-based coverage (see llvm/llvm-project#32849). On the flip side, the coverage build and test run will take a bit longer (e.g., around 30m) with this change. This PR switches to static linking for just test coverage and does not do the same for fuzz coverage. That's because Envoy CI is hitting some resource constraints when building fuzz targets with coverage instrumentation. We will fix that by striping the fuzz targets of some unncessary dependencies and switching to EngFlow backend for coverage builds and tests, but that will require addressing a couple of hard to understand issues, so, for now, I'm just switching the coverage tests to static linking and will follow up with the fuzz tests later once we addressed all the blockers and switched to EngFlow backend for coverage. Additional Description: envoyproxy#39030 provides some context for EngFlow migration and envoyproxy#39248 is a tracking bug. Signed-off-by: Mikhail Krinkin <mkrinkin@microsoft.com>
phlax
pushed a commit
to phlax/envoy
that referenced
this pull request
Jun 11, 2025
Static linking helps to work around the issue with LLVM/Clang source-based coverage (see llvm/llvm-project#32849). On the flip side, the coverage build and test run will take a bit longer (e.g., around 30m) with this change. This PR switches to static linking for just test coverage and does not do the same for fuzz coverage. That's because Envoy CI is hitting some resource constraints when building fuzz targets with coverage instrumentation. We will fix that by striping the fuzz targets of some unncessary dependencies and switching to EngFlow backend for coverage builds and tests, but that will require addressing a couple of hard to understand issues, so, for now, I'm just switching the coverage tests to static linking and will follow up with the fuzz tests later once we addressed all the blockers and switched to EngFlow backend for coverage. Additional Description: envoyproxy#39030 provides some context for EngFlow migration and envoyproxy#39248 is a tracking bug. Signed-off-by: Mikhail Krinkin <mkrinkin@microsoft.com> Signed-off-by: Ryan Northey <ryan@synca.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Message:
Static linking helps to work around the issue with LLVM/Clang source-based coverage (see
llvm/llvm-project#32849). On the flip side, the coverage build and test run will take a bit longer (e.g., around 30m) with this change.
This PR switches to static linking for just test coverage and does not do the same for fuzz coverage. That's because Envoy CI is hitting some resource constraints when building fuzz targets with coverage instrumentation.
We will fix that by striping the fuzz targets of some unncessary dependencies and switching to EngFlow backend for coverage builds and tests, but that will require addressing a couple of hard to understand issues, so, for now, I'm just switching the coverage tests to static linking and will follow up with the fuzz tests later once we addressed all the blockers and switched to EngFlow backend for coverage.
Additional Description:
#39030 provides some context for EngFlow migration and #39248 is a tracking bug.
Risk Level: low
Testing: regular Envoy CI
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a
+cc @phlax @yanavlasov