safelog suppression is flaky in tests
Symptoms like https://gitlab.torproject.org/Diziet/arti/-/jobs/205220#L931
---- test::test_redacted stdout ----
thread 'test::test_redacted' panicked at 'assertion failed: `(left == right)`
left: `"127.0.0.1"`,
right: `"127.x.x.x"`', crates/safelog/src/lib.rs:394:9
After unsuccessful ad-hoc repro attempts, I ran (with the branch from !910 (merged)):
-
cargo +nightly test
. Failed. -
cargo +nightly test -p safelog
. Succeeded. -
cargo +nightly test
. Succeeded.
I conclude that this test doesn't work properly in the cargo test environment, with multiple threads running in multiple configurations. (NB actual runes were things like this: nailing-cargo +nightly test -p safelog
=> cargo +nightly test --manifest-path=/home/ian/Rustup/Arti/arti/Cargo.toml --locked --target-dir=target --offline -p safelog
)
@nickm: Is there another test that attempts to set the global safelog flag?
Edited by Ian Jackson