Skip to content
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

feat(SwingSet): Support SLOG* environment variables when running tests #10061

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gibson042
Copy link
Member

Description

Provides a buildTestVatController test helper that wraps buildVatController in order to inject a slogSender option as requested by SLOGFILE/SLOGSENDER/SLOGSENDER_AGENT environment variables.

Security Considerations

Minimal; this is testing code and nobody will be looking for a slog file they didn't request. The worst plausible scenario I can think of is someone having an exported environment variable and being surprised that running tests unexpectedly affects a file.

Scaling Considerations

n/a

Documentation Considerations

This is already documented at docs/env.md, but perhaps the "Affects:" details should be updated to mention SwingSet tests?

Testing Considerations

This is currently limited to the file where I needed it, but could easily cover much more.

Upgrade Considerations

n/a

Copy link
Member

@mhofman mhofman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine. I've always found it weird that buildVatController is "used for tests only", yet lives in src, but I think it's because some tools also use it.

@gibson042
Copy link
Member Author

I've always found it weird that buildVatController is "used for tests only", yet lives in src, but I think it's because some tools also use it.

Hmm, I didn't realize that but you're right. Maybe I should instead skip the wrapper and add this functionality directly? I could probably also move the function to tools in the process.

@mhofman
Copy link
Member

mhofman commented Sep 11, 2024

add this functionality directly? I could probably also move the function to tools in the process.

I think I'd only want to add it directly if moved. The reason is that the kernel source shouldn't take a dependency on the telemetry package.

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.

2 participants