diff --git a/sys/kerncore/src/lib.rs b/sys/kerncore/src/lib.rs index c5079d18b..cb526b161 100644 --- a/sys/kerncore/src/lib.rs +++ b/sys/kerncore/src/lib.rs @@ -274,6 +274,11 @@ mod tests { size: 0x0001_0000, label: "good".to_string(), }, + TestRegion { + base: 0x123A_5678, + size: 0x0001_0000, + label: "good".to_string(), + }, ] } const GOOD_REGION_0_IDX: usize = 0; @@ -418,37 +423,4 @@ mod tests { ranges but passes through bad one, but can", ); } - - #[test] - fn cannot_access_slice_spanning_over_uncontained_memory() { - // Using a custom region table to not cause - // cannot_access_uncontained_memory to spuriously fail. - let region_table = vec![ - TestRegion { - base: 0x1238_5678, - size: 0x0001_0000, - label: "good".to_string(), - }, - TestRegion { - // 64 kiB separated from previous region - base: 0x123A_5678, - size: 0x0001_0000, - label: "good".to_string(), - }, - ]; - - let base = region_table[GOOD_REGION_0_IDX].base + 10; - let end = region_table[GOOD_REGION_1_IDX].end_addr() - 10; - let slice = TestSlice { - base, - size: end - base, - }; - - assert!( - // Load-bearing tiny punctuation character: - !can_access(slice, ®ion_table, accept_only_good_regions,), - "should NOT be able to access slice that starts and ends in \ - good ranges but passes through uncontained memory, but can", - ); - } }