Add UFFD tests to current implementation#1415
Merged
Merged
Conversation
Member
Author
|
Currently resolving why there is a freeze during some tests—https://github.com/e2b-dev/infra/tree/uffd-freeze |
ValentaTomas
commented
Nov 3, 2025
|
|
||
| u.readyCh <- struct{}{} | ||
|
|
||
| missingRequests := &sync.Map{} |
Member
Author
There was a problem hiding this comment.
The switch to a thread safe map was needed because of the tests, but we would switch to a thread safe solution in later PRs still.
djeebus
approved these changes
Nov 4, 2025
ValentaTomas
added a commit
that referenced
this pull request
May 2, 2026
…MissingWriteWithPrefault loads to 1_000_000 Continues the regression sweep started in 4681ab2. The original PR #1415 (88c3960, Nov 3 2025) introduced these tests at 1_000_000 operations. PR #1450 (6ee2ebb, Nov 7 2025, "Modify UFFD tests to run serve loop in a separate process") cut them all to 10_000 in the same commit that switched from in-process to cross-process tests, with no commit message justification. The cross-process refactor itself does not require lower iteration counts: the per-iteration work is still in-process memory access; only the page-state snapshot RPC is cross-process and is called once per test. Reverts: - TestSerialMissing: 10_000 -> 1_000_000 - TestSerialMissingWrite: 10_000 -> 1_000_000 - TestParallelMissingWriteWithPrefault: 10_000 -> 1_000_000 Per-test wall time on this branch (sudo go test, no -race): - TestSerialMissing ~3s - TestSerialMissingWrite ~3s - TestParallelMissingWriteWithPrefault ~2s TestParallelMissingWithPrefault stays at 10_000: it was only ever parallelOperations := 10 in #1415, then bumped to 10_000 in #1450, so 10_000 is already above its historical baseline.
ValentaTomas
added a commit
that referenced
this pull request
May 4, 2026
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.
Note
Add UFFD missing-page read/write tests and utilities, and update Serve/handler to track in-flight pagefaults via a shared sync.Map.
Serveto acceptmissingRequests *sync.Mapand use it to dedupe in-flight MISSING pagefaults (replacing a local map).missingRequestsfromUffd.handlewhen invokingServe.helpers_test.goto spin up UFFD, map memory, and run read/write operations against aMemorySlicer.missing_test.goandmissing_write_test.gocovering 4k/hugepage MISSING faults, serial/parallel runs, and prefault scenarios.testutils/(random data, page mmap helpers, test logger, byte diff) and minimaluserfaultfdsyscall wrappers (open/configure/register/copy/close) for tests.Written by Cursor Bugbot for commit e2b11e6. This will update automatically on new commits. Configure here.