Merged
Conversation
- Add ContainerOptions struct with HostAccess for tests needing host.docker.internal access - Add runContainerWithOptions() to support new container options - Add getContainerLogs() helper to retrieve container logs for debugging - Add waitHTTPOrExitWithLogs() that captures container logs on failure and periodically logs container status during wait - Auto-inject --no-sandbox flag for CI environments (Ubuntu 24.04 GA) - Fix tmpfs mode to 1777 for proper /dev/shm permissions - Run tests sequentially (-p 1) to avoid port conflicts - Add cookie and IndexedDB persistence tests These improvements were developed in kernel-images-private and contributed back to the public upstream.
a03b139 to
b67bc9a
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 4 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
- Move defer stopContainer immediately after runContainerWithOptions to ensure container cleanup even if wait fails - Fail test if unzip exits with non-zero code instead of just logging - Check HTTP status code (200) in restartChromium, not just curl exit - Fail test with clear message if CDP doesn't become ready after 15s
The cookie and IndexedDB persistence tests require kernel-browser (patched Chromium with session cookie persistence and faster flush). These patches only exist in the private images, so these tests cannot run on the public kernel-images repo.
hiroTamada
reviewed
Jan 26, 2026
| go test -v -race ./... | ||
| # Run tests sequentially (-p 1) to avoid port conflicts in e2e tests | ||
| # (all e2e tests bind to the same ports: 10001, 9222) | ||
| go test -v -race -p 1 ./... |
Contributor
There was a problem hiding this comment.
can we randomly select available port in the testing suite?
Contributor
Author
There was a problem hiding this comment.
i have a plan ready to go to do this but just trying to fix web-bot-auth stuff before i open a follow up pr for parallelizing these tests and picking a random port
hiroTamada
approved these changes
Jan 26, 2026
Contributor
hiroTamada
left a comment
There was a problem hiding this comment.
one question. But LGTM
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.
Summary
This PR contributes improvements to the e2e test infrastructure:
Test Infrastructure Improvements
ContainerOptionsstruct - AddsHostAccessoption for tests that need--add-host=host.docker.internal:host-gatewayto reach services on the host machinerunContainerWithOptions()- New function supportingContainerOptionsfor flexible container configurationgetContainerLogs()- New helper to retrieve the last N lines of container logs for debugging failed testswaitHTTPOrExitWithLogs()- Enhanced wait function that:--no-sandboxauto-injection - Automatically adds--no-sandboxtoCHROMIUM_FLAGSfor CI environments where unprivileged user namespaces may be disabled (e.g., Ubuntu 24.04 GitHub Actions)--tmpfsmode fix - Changed from:size=2gto:size=2g,mode=1777for proper/dev/shmpermissions-p 1flag to run tests sequentially, avoiding port conflicts since all e2e tests bind to the same ports (10001, 9222)Test plan