Skip to content

Commit cf59c5a

Browse files
RuoqingHeroypat
authored andcommitted
test: Reduce size of test_bitmap
`test_bitmap` invoked with `AtomicBitmapArc` in `miri` test took very long to complete, which exceeds the time limit of Buildkit agent. Reduced the size of `AtomicBitmap`. Signed-off-by: Ruoqing He <[email protected]>
1 parent 9b3086f commit cf59c5a

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/bitmap/backend/atomic_bitmap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ mod tests {
275275

276276
#[test]
277277
fn test_bitmap_impl() {
278-
let b = AtomicBitmap::new(0x2000, DEFAULT_PAGE_SIZE);
278+
let b = AtomicBitmap::new(0x800, DEFAULT_PAGE_SIZE);
279279
test_bitmap(&b);
280280
}
281281
}

src/bitmap/backend/atomic_bitmap_arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ mod tests {
8282
#[test]
8383
fn test_bitmap_impl() {
8484
// SAFETY: `128` is non-zero.
85-
let b = AtomicBitmapArc::new(AtomicBitmap::new(0x2000, unsafe {
85+
let b = AtomicBitmapArc::new(AtomicBitmap::new(0x800, unsafe {
8686
NonZeroUsize::new_unchecked(128)
8787
}));
8888
test_bitmap(&b);

src/bitmap/backend/slice.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ mod tests {
103103

104104
#[test]
105105
fn test_slice() {
106-
let bitmap_size = 0x1_0000;
107-
let dirty_offset = 0x1000;
106+
let bitmap_size = 0x800;
107+
let dirty_offset = 0x400;
108108
let dirty_len = 0x100;
109109

110110
{

src/bitmap/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ pub(crate) mod tests {
140140
}
141141

142142
// Helper method that tests a generic `B: Bitmap` implementation. It assumes `b` covers
143-
// an area of length at least 0x2000.
143+
// an area of length at least 0x800.
144144
pub fn test_bitmap<B: Bitmap>(b: &B) {
145-
let len = 0x2000;
146-
let dirty_offset = 0x1000;
145+
let len = 0x800;
146+
let dirty_offset = 0x400;
147147
let dirty_len = 0x100;
148148

149149
// Some basic checks.

0 commit comments

Comments
 (0)