CHROMIUM: bindings/rust/libflashrom: Replace rusty-fork with alternatives
The `rusty-fork` crate, used for isolating tests in separate processes,
is no longer actively maintained. This commit replaces it with a
combination of modern, well-maintained crates to achieve the same goal
while improving the project's long-term health.
The key changes are:
- Replaced `rusty-fork` with `fork`
- Refactored the test suite to use a `run_in_fork` helper function,
which encapsulates the process forking logic.
- Removed an unsafe `static mut` in the logging test in favor of a
safe, thread-local implementation.
This change resolves the dependency on an unmaintained crate and brings
the test suite inline with modern Rust practices without altering the
core test logic.
BUG=b:426471570
TEST=`cargo test` in bindings/rust/libflashrom
Change-Id: I1d8c53d8aec3d08684aedcb14874035c464ee167
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/flashrom/+/6671390
Reviewed-by: Jian-Jia Su <jjsu@chromium.org>
2 files changed