Skip to content

[BOLT] Mark build skipped when tests did not run #468

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

Open
wants to merge 7 commits into
base: users/paschalis-mpeis/increase-test-coverage
Choose a base branch
from

Conversation

paschalis-mpeis
Copy link
Member

If in-tree tests do not run, mark the whole build as skipped. Note that when this happens, out-of-tree tests also do not run.

This helps when navigating Buildbot's build requests:

  • Skipped builds indicate the change was unrelated to BOLT.
  • Any other errors are still reported.
  • For breaking changes that need reversal, builds will show as SKIPPED or FAILURE depending on whether llvm-bolt was affected, instead of SUCCESS or FAILURE, which can be confusing.

paschalis-mpeis and others added 7 commits May 29, 2025 14:38
NFC-mode runs in-tree and out-of-tree (large BOLT tests) when there are changes
affecting llvm-bolt between the current revision and the previous one.

However, the revision SHA itself and the GNU build-id may be two unique
differences when doing such a comparison.

This patch introduces a lightweight sanity check step that reports a warning on
the Buildbot so that we are aware when this occurs.
Pass '--build-id' to the linker to disable emission of a unique
build ID into a note section. This breaks nfc-mode tests.

Additional cleanup:
- Out-of-tree tests are now labeled as 'BOLT large tests'
- Dropped step 'nfc-stat-check' as it was disabled
- Removed unused flags for Non-NFC tests
When setting up the nfc-mode tests, avoid adding an extra pair of in-tree and
out-of-tree tests that were unconditional. This was previously done with
addNinjaSteps. Instead, add those later and make them conditional on llvm-bolt
being modified.

Since tests are now only added by BOLTBuilder:
- `ninja` runs the in-tree tests to correctly build dependencies.
- flunkOnFailure is set to update the build status on failures.

Some nits:
- the '--switch-back' flag is used (from nfc-check-setup.py).
- a 'nfc-' prefix is appended to 'check-bolt-different' step
- remove timing.log cleanup
Use `--check-bolt-sources` from nfc-check-setup.py to run tests
when source files change between the current and previous revisions.

This triggers only in-tree tests. When the llvm-bolt binary changes,
both in-tree and out-of-tree tests are run.
If in-tree tests do not run, mark the whole build as skipped. Note
that when this happens, out-of-tree tests also do not run.

This helps when navigating Buildbot's build requests:
- Skipped builds indicate the change was unrelated to BOLT.
- Any other errors are still reported.
- For breaking changes that need reversal, builds will show as
  SKIPPED or FAILURE depending on whether llvm-bolt was affected,
  instead of SUCCESS or FAILURE, which can be confusing.
@paschalis-mpeis
Copy link
Member Author

paschalis-mpeis commented Jun 10, 2025

This PR aims to make navigating completed build requests more efficient, and less confusing. Note that the WARNINGS won't be displayed once these patches are merged (see discourse post).

An updated table with example patches after this feature:

# PATCH CODE CHANGE In-Tree Out-Of-Tree Build Status
1 e24d86 Modifies only a BOLT test. Draft Draft Draft
2 6090c0 Modifies only a BOLT test. Draft Draft Draft
3 b037d0 Modifies bolt heatmap docs. Draft Draft Draft
4 7a688c Modifies LLVM: an unsupported backend (ARM). Draft Draft Draft
5 3a9893 Modifies LLVM: a supported backend (AArch64). Draft Draft Draft
6 SHAs that fulfill next column → when nfc-check-setup was somehow broken Draft (unconditionally) Draft (unconditionally) Draft or Draft if more serious
7 SHAs before both #463 and #142410 get merged when nfc-check-validation is failing (ie unique ids embedded in binaries) Draft (unconditionally, as it thinks binaries are different. comparison is flawed though) Draft (unconditionally, as it thinks binaries are different. comparison is flawed though) Draft or Draft if more serious

@paschalis-mpeis paschalis-mpeis marked this pull request as ready for review June 10, 2025 15:54
@paschalis-mpeis paschalis-mpeis requested a review from aaupov June 10, 2025 15:54
@paschalis-mpeis paschalis-mpeis force-pushed the users/paschalis-mpeis/increase-test-coverage branch from 8f4aaf1 to 326abf3 Compare June 13, 2025 09:57
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 this pull request may close these issues.

1 participant