diff options
author | Miquel Raynal <miquel.raynal@free-electrons.com> | 2017-08-24 12:59:46 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2017-08-24 13:00:58 +0200 |
commit | 4458ad6481f60d9884925d5bc62a7954880d181b (patch) | |
tree | 41b28b90221bc6ddb5be3357e0f35eb158ea0818 /tests/fs-tests/lib/tests.h | |
parent | 76a55b190c3b15f512c1daf5976249b38db916d6 (diff) |
mtd-utils: tests: Avoid using less than two blocks in nandpagetest
Forbid the use of less than 2 eraseblocks in nandpagetest. It is obvious
that the test cannot run on zero block, but it cannot run on only one
block neither. The reason is: get_first_and_last_block() will return the
same id for both the first and the last blocks. In erasecrosstest(),
the logic is:
- erase/write/read/verify first block
- erase/write again first block
- erase *last* block
- read/verify first block
When using only one block, 'first' refers to the same block as 'last',
leading to erasing the block before reading it. Hence, the test would
fail with no actual reason.
Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tests/fs-tests/lib/tests.h')
0 files changed, 0 insertions, 0 deletions