mirror of https://github.com/ARMmbed/mbed-os.git
Fix general block device test to ensure unique block address per test
parent
3252530e3a
commit
4bbc2cdc5b
|
|
@ -187,6 +187,11 @@ void basic_erase_program_read_test(BlockDevice *block_device, bd_size_t block_si
|
|||
{
|
||||
int err = 0;
|
||||
_mutex->lock();
|
||||
|
||||
// Make sure block address per each test is unique
|
||||
static unsigned block_seed = 1;
|
||||
srand(block_seed++);
|
||||
|
||||
// Find a random block
|
||||
bd_addr_t block = (rand() * block_size) % (block_device->size());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue