oxidecomputer / oxidecomputer/dropshot
test_util: Add meaningful names to test LogContexts
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.2k
- Forks
- 104
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 22
Description
Currently, when a test creates a new LogContext, a numeric counter is incremented every time a test creates a new LogContext, and the resultant path will be of the form {test_name}.{pid}.{id}.log. The counter is useful as it ensures that multiple LogContexts can coexist within a single test execution. However, it doesn't really help with identifying what entity in the test created that log file. Instead, this must be inferred by reading the test code to determine the order in which LogContexts are created, which can sometimes be challenging --- especially when there's a bunch of test support code spinning up multiple Dropshot servers.
It would be nice if there was a way to add a human-readable test component identifier to these log paths, like "server" or "client". The counter could still be used in addition to such an additional identifier to ensure all paths are unique.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the test_util code that creates LogContext paths and inspect the test sites that create multiple contexts, especially support code for Dropshot servers. Define how a human-readable component identifier is supplied and verify that generated paths include it while the numeric counter still keeps paths unique.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100