summaryrefslogtreecommitdiff
path: root/tests/mtd-tests
AgeCommit message (Collapse)Author
2017-08-24mtd-utils: tests: Avoid using less than two blocks in nandpagetestMiquel Raynal
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>
2017-07-03mtd-utils: tests: Add Erased Pages Bit Flip TestHarpreet Eli Sangha
Bit flip detection for written and erased pages tend to have different implementations. Where written pages are detected and corrected using ECC, erased pages are typically detected by ensuring that the number of zeros is less than a specified threshold. As such, it's necessary to have the 'nandbiterrs' test support the testing of written and erased pages. Bit flips in erased pages are emulated by rewriting the page in raw mode, to prevent the use of ECC. Signed-off-by: Harpreet Eli Sangha <harpreet@nestlabs.com> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2017-06-28mtd-utils: tests: Fix nandbiterrs Failure CheckHarpreet Eli Sangha
After a page read, the old failure statistics are compared against the new failure statistics before the new values are actually read. Signed-off-by: Harpreet "Eli" Sangha <harpreet@nestlabs.com> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2017-02-20mtd-utils: Fix format specifier definitions for off_t and loff_t.Torsten Fleischer
On 32bit systems (e.g. ARM) the size of off_t can be 4 byte and the size of loff_t 8 byte. This causes compiler warnings like the following: flash_erase.c: In function 'show_progress': flash_erase.c:56:22: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'off_t {aka long int}' [-Wformat=] bareverbose(!quiet, "\rErasing %d Kibyte @ %"PRIxoff_t" -- %2i %% complete ", and an output like this: ~# flash_erase /dev/mtd2 0 1 Erasing 64 Kibyte @ 6400000000 -- 0 % complete ~# Since the size of off_t and loff_t can differ from each other, the printf format specifier should be determined separately for both. Further the format specifiers should be based directly on the size of the particular data type. Signed-off-by: Torsten Fleischer <torfl6749@gmail.com> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2016-11-17mtd-utils: Add nand sub-page test utilityDavid Oberhollenzer
Basically a user space port of the mtd sub page test kernel module. In addition to the module parameters, the utility supports using only a sub-range of the flash erase blocks with a configurable stride and can restore the block contents after the test. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at> Signed-off-by: Richard Weinberger <richard@nod.at>
2016-11-17mtd-utils: Add nand page test utilityDavid Oberhollenzer
Basically a user space port of the mtd page test kernel module. In addition to the module parameters, the utility supports using only a sub-range of the flash erase blocks with a configurable stride. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at> Signed-off-by: Richard Weinberger <richard@nod.at>
2016-11-17mtd-utils: Add flash read test utilityDavid Oberhollenzer
Basically a user space port of the mtd read test kernel module. In addition to the module parameters, the utility can scan only a sub-range of the flash erase block with a configurable stride. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at> Signed-off-by: Richard Weinberger <richard@nod.at>
2016-11-17mtd-utils: Add nand flash bit errors testDavid Oberhollenzer
Basically a user space port of the mtd speed test kernel module. In addition to the module parameters, the utility can resture the block contents after test and allows setting the maxium writes for the test. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at> Signed-off-by: Richard Weinberger <richard@nod.at>
2016-11-17mtd-utils: Add flash speed test utilityDavid Oberhollenzer
Basically a user space port of the mtd speed test kernel module. In addition to the block offset and count module parameters, the utility supports a block stride and can restore the block contents after test. Furthermore, a flag can be used to disable destructive tests (i.e. only perform read speed tests). Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at> Signed-off-by: Richard Weinberger <richard@nod.at>
2016-11-17mtd-utils: Add flash stress test utilityDavid Oberhollenzer
Basically a user space port of the mtd stress test kernel module. In addition to the block offset and count module parameters, the utility supports a block stride and can restore the block contents after test. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at> Signed-off-by: Richard Weinberger <richard@nod.at>
2016-11-17mtd-utils: Add flash torture test utilityDavid Oberhollenzer
Basically a user space port of the mtd torture test kernel module. In addition to the block offset and count module parameters, the utility supports a block stride and can restore the block contents after test. In contrast to the kernel module, the torture test is implemented by the libmtd mtd_toruture function and thus doesn't allow for similarly fine grained options on diagnostics. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at> Signed-off-by: Richard Weinberger <richard@nod.at>