diff --git a/repos/os/src/app/block_tester/test_sequential.h b/repos/os/src/app/block_tester/test_sequential.h index 7607006fd5..758bfb9fac 100644 --- a/repos/os/src/app/block_tester/test_sequential.h +++ b/repos/os/src/app/block_tester/test_sequential.h @@ -52,6 +52,10 @@ struct Test::Sequential : Test_base _size_in_blocks = _size / _info.block_size; _length_in_blocks = _length / _info.block_size; _end = _start + _length_in_blocks; + + if (_length == 0 || (_length % _info.block_size) != 0) + error("length attribute (", _length, ") must be a multiple of " + "block size (", _info.block_size, ")"); } void _spawn_job() override