Skip to content

Commit 85afd42

Browse files
committed
Fix failing testcase for VxWorks
Reduce the number of slots that are created from 4096 to 1024 for VxWorks as too many slots can cause a stack overflow
1 parent 3b0283f commit 85afd42

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/index_map.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1742,8 +1742,11 @@ mod tests {
17421742

17431743
// tests that use this constant take too long to run under miri, specially on CI, with a map of
17441744
// this size so make the map smaller when using miri
1745-
#[cfg(not(miri))]
1745+
#[cfg(not(any(miri, target_os = "vxworks")))]
17461746
const MAP_SLOTS: usize = 4096;
1747+
// Reduce number of slots as too many slots can cause a stack overflow on VxWorks.
1748+
#[cfg(target_os = "vxworks")]
1749+
const MAP_SLOTS: usize = 1024;
17471750
#[cfg(miri)]
17481751
const MAP_SLOTS: usize = 64;
17491752
fn almost_filled_map() -> FnvIndexMap<usize, usize, MAP_SLOTS> {

0 commit comments

Comments
 (0)