test(ffi): Miri skips the allocation it cannot model

551e180a1f said the refused-allocation test stays native, and nothing kept it
there: under Miri the isize::MAX-class request is Miri's own resource
exhaustion, which ends the run instead of answering. The attribute says so, so
`cargo miri test -p dev-ffi --lib` now finishes: 20 passed, 1 ignored.

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-09-19 03:42:58 -07:00
co-authored by Hanzo Dev
parent 551e180a1f
commit ae2bc19674
+4
View File
@@ -726,7 +726,11 @@ mod tests {
/// refusal is the allocator's own: the one that aborts a process rather
/// than unwinding. The lengths past it have no layout at all. Every one of
/// them is a null the host can check.
///
/// Native only: Miri models a request this size as its own resource
/// exhaustion and stops the whole run rather than answering it.
#[test]
#[cfg_attr(miri, ignore)]
fn a_refused_allocation_is_null_rather_than_an_abort() {
let most = isize::MAX.unsigned_abs();
let longest = most - (align_of::<(u64, Buf)>() - 1);