evmar / n2

n2 ("into"), a ninja compatible build system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`e2e::validations::build_starts_before_validation_finishes` fails every so often

GrigorenkoPV opened this issue · comments

Especially when my PC is under some load. A race condition maybe?

---- e2e::validations::build_starts_before_validation_finishes stdout ----
thread 'e2e::validations::build_starts_before_validation_finishes' panicked at tests/e2e/validations.rs:55:5:
assertion failed: space.read("out").is_ok()
stack backtrace:
   0: rust_begin_unwind
             at /rustc/0e09125c6c3c2fd70d7de961bcf0e51575235fad/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/0e09125c6c3c2fd70d7de961bcf0e51575235fad/library/core/src/panicking.rs:72:14
   2: core::panicking::panic
             at /rustc/0e09125c6c3c2fd70d7de961bcf0e51575235fad/library/core/src/panicking.rs:144:5
   3: e2e_test::e2e::validations::build_starts_before_validation_finishes
             at ./tests/e2e/validations.rs:55:5
   4: e2e_test::e2e::validations::build_starts_before_validation_finishes::{{closure}}
             at ./tests/e2e/validations.rs:24:49
   5: core::ops::function::FnOnce::call_once
             at /rustc/0e09125c6c3c2fd70d7de961bcf0e51575235fad/library/core/src/ops/function.rs:250:5
   6: core::ops::function::FnOnce::call_once
             at /rustc/0e09125c6c3c2fd70d7de961bcf0e51575235fad/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Running x86_64 Arch Linux 6.6.10 on AMD Ryzen 5 4600H.
Rust 1.76.0-beta.1 (1a2666ddd 2023-12-17).
Can also reproduce on stable 1.75.0 (1d8b05cdd 2023-11-20).

CC @Colecf . The test has some sleeps so probably something racy 😬 . I will take a look.

I think I fixed this. Lemme know @Colecf if you think I broke the spirit of the test, I think it's hopefully ok?