Repository navigation
topology-aware: uncompress the test sysfs data once - #872
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
Initialization is synchronized, cleanup preserves test results, and the fixture-mutating test remains isolated.
No open issues 🎉
What changed in this PR
This PR reduces topology-aware policy test runtime by sharing one extracted sysfs fixture across tests instead of repeatedly unpacking it.
Changes:
- Initializes the shared fixture once with
sync.Onceand reports extraction failures to tests. - Adds suite-level cleanup in
TestMain, preserving the test exit code and reporting cleanup errors.
| File | Description |
|---|---|
cmd/plugins/topology-aware/policy/pools_test.go |
Shares sysfs fixture initialization and removes the extracted data after the test suite finishes. |
Review effort: Balanced
bart0sh
marked this pull request as draft
October 23, 2026 05:39
bart0sh
force-pushed
the
PR011-uncompress-sysfs-once
branch
from
October 23, 2026 05:43
4930ab5 to
28df8aa
Compare
Each test uncompressed the whole tarball, which takes about 20s with -race, so the package hit the default 10m timeout of go test. Share one copy across the tests instead. The shared copy is read-only, so a test which changes it fails. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
bart0sh
force-pushed
the
PR011-uncompress-sysfs-once
branch
from
October 23, 2026 05:55
28df8aa to
8d1f80d
Compare
bart0sh
marked this pull request as ready for review
October 23, 2026 06:28
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.
Each topology-aware policy test uncompressed the test sysfs tarball into a directory of its own. The tarball expands to 222 MB in about 64,000 files, so with
-racethe package came close to the default 10 minute timeout ofgo test. The tests now share one copy. It is uncompressed once and removed when the tests finish. The shared copy is read-only, so a test which changes it fails. The one test which changes the data keeps a private copy.go test ./cmd/plugins/topology-aware/policy/-race-race