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

std/lib: {fs,io,posix} test clean up #23014

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

Conversation

rootbeer
Copy link
Contributor

  • use tmp.dir.realpathAlloc() to get full path into tmpDir instances
  • use testing.allocator to remove Arena allocator setups
  • Trust TmpDir.cleanup() to clean up contained files and sub-trees
  • Remove some unnecessary absolute paths (enabling WASI to run the tests)
  • Drop some no-longer necessary [_][]const u8 casts
  • Add scopes to reduce var usage in favor of const
  • Move platform-specific (e.g., WASI+libc) logic into the core of a test (instead of skipping the whole test) to improve coverage

* use `tmp.dir.realpathAlloc()` to get full path into tmpDir instances
* use `testing.allocator` where that simplifies things (vs. manual ArenaAllocator for 1 or 2 allocs)
* Trust `TmpDir.cleanup()` to clean up contained files and sub-trees
* Remove some unnecessary absolute paths (enabling WASI to run the tests)
* Drop some no-longer necessary `[_][]const u8` casts
* Add scopes to reduce `var` usage in favor of `const`
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