File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
storage/blockdevice/tests/TESTS/blockdevice/general_block_device Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -549,8 +549,15 @@ void test_contiguous_erase_write_read()
549
549
utest_printf (" contiguous_erase_size=0x%" PRIx64 " \n " , contiguous_erase_size);
550
550
551
551
bd_size_t write_read_buf_size = program_size;
552
- if (contiguous_erase_size / program_size > 8 && contiguous_erase_size % (program_size * 8 ) == 0 ) {
553
- write_read_buf_size = program_size * 8 ;
552
+
553
+ // Reading/writing in larger chunks reduces the number of operations,
554
+ // helping to avoid test timeouts. Try 256-byte chunks if contiguous_erase_size
555
+ // (which should be a power of 2) is greater than that. If it's less than
556
+ // that, the test finishes quickly anyway...
557
+ if ((program_size < 256 ) && (256 % program_size == 0 )
558
+ && (contiguous_erase_size >= 256 ) && (contiguous_erase_size % 256 == 0 )) {
559
+ utest_printf (" using 256-byte write/read buffer\n " );
560
+ write_read_buf_size = 256 ;
554
561
}
555
562
556
563
// Allocate write/read buffer
You can’t perform that action at this time.
0 commit comments