4 ms·
> Memory corruption in one test doesn’t cause others to behave erratically. One test segfaulting does not take down a bunch of other tests. Is "memory corrupti
by sedatk 2y ago
> Memory corruption in one test doesn’t cause others to behave erratically. One test segfaulting does not take down a bunch of other tests.
Is "memory corruption" an issue with Rust? Also, if one test segfaults, isn't it a reason to halt the run because something got seriously broken?
- codetrotter 2y ago> Is "memory corruption" an issue with Rust? You can cause memory corruption if you opt out of memory safety guarantees by using Unsafe Rust. https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html Sometimes unsafe is necessary and the idea then is that the “dangerous” parts of the code remain isolated in explicitly marked “unsafe” blocks, where it can be closely reviewed. Also, even if your own Rust code is doing nothing unsafe you might be using external libraries written in other languages and things might go wrong. > if one test segfaults, isn't it a reason to halt the run because something got seriously broken? Sometimes it’s still interesting and helpful to continue running other tests even if one fail. If several of them fail it might even help you pinpoint exactly what’s going wrong than just a single failure might. (Although having a bunch of failing tests can also be more noise.)
- sunshowers 2y agoIn local runs it makes sense to halt the run, but in CI not as much — nextest makes this entirely configurable.