Commit Graph
4 Commits
Author SHA1 Message Date
Brian Norris 1001ff7a4f mtd: tests: fix integer overflow issues
These multiplications are done with 32-bit arithmetic, then converted to
64-bit. We should widen the integers first to prevent overflow. This
could be a problem for large (>4GB) MTD's.

Detected by Coverity.

Signed-off-by: Brian Norris <[email protected]>
Cc: Akinobu Mita <[email protected]>
2014-08-19 11:53:08 -07:00
Akinobu Mita abc173ad84 mtd: tests: incorporate error message for mtdtest_read()
All callers of mtdtest_read() print the same error message on failure.
This incorporates the error message to mtdtest_read() and removes them
from the callers.

Signed-off-by: Akinobu Mita <[email protected]>
Signed-off-by: Artem Bityutskiy <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
2013-08-30 21:36:05 +01:00
Akinobu Mita bf9c223664 mtd: mtd_readtest: use mtd_test helpers
Use mtdtest_read() and mtdtest_scan_for_bad_eraseblocks() in mtd_test
helpers.

Signed-off-by: Akinobu Mita <[email protected]>
Cc: Brian Norris <[email protected]>
Cc: Vikram Narayanan <[email protected]>
Cc: Adrian Hunter <[email protected]>
Signed-off-by: Artem Bityutskiy <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
2013-08-30 21:34:18 +01:00
Akinobu Mita a995c79228 mtd: tests: rename sources in order to link a helper object
Each mtd test module have a single source whose name is the same as
the module name.  In order to link a single object including helper
functions to every test module, this rename these sources to the
different names.

Signed-off-by: Akinobu Mita <[email protected]>
Cc: Brian Norris <[email protected]>
Cc: Vikram Narayanan <[email protected]>
Cc: Adrian Hunter <[email protected]>
Signed-off-by: Artem Bityutskiy <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
2013-08-30 21:34:06 +01:00