cuviper / autocfg

Automatic cfg for Rust compiler features
Apache License 2.0
95 stars 24 forks source link

Racy failures in `test_wrappers` #61

Closed cuviper closed 4 months ago

cuviper commented 4 months ago

This assertion occasionally fails: https://github.com/cuviper/autocfg/blob/c10bc170ca6cc8176b046dce8d7e73e8b24f6d76/tests/wrappers.rs#L45-L50

I found that the probe sometimes gets an EPIPE when writing input to the child process. In this particular test scenario, the dummy /bin/true wrapper may exit too quickly, closing its stdin before we had a chance to write anything (which it wasn't going to look at anyway).

I don't think it's wrong for the library to consider that a failed probe, but I'd like to make the test more robust.