diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-06-15 14:01:31 +0300 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-06-15 14:02:48 +0300 |
commit | e4867287195421ed3c41e15ce292b00b1c0e3649 (patch) | |
tree | 65eb1b5b75aae14831647c8af122730dd1b8165b /tests/ubi-tests/common.h | |
parent | a6a67a71a26d6906c1c1fd12ea7eef9a9c9b4e2d (diff) |
ubi-test: seed the random genrator in tests
Add a common seed_random_generator() and make tests use it
for seeding the random generator.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'tests/ubi-tests/common.h')
-rw-r--r-- | tests/ubi-tests/common.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/tests/ubi-tests/common.h b/tests/ubi-tests/common.h index 859af14..88e963f 100644 --- a/tests/ubi-tests/common.h +++ b/tests/ubi-tests/common.h @@ -90,19 +90,21 @@ extern "C" { (s)/5-3, (s)/5-2, (s)/5-1, (s)/5+1, (s)/5+2, (s)/5+3, (s)-17, (s)-9, \ (s)-8, (s)-6, (s)-4, (s)-1, (s)}; +extern int seed_random_generator(void); + extern void __errmsg(const char *test, const char *func, int line, const char *fmt, ...); -void __failed(const char *test, const char *func, int line, - const char *failed); -int __initial_check(const char *test, int argc, char * const argv[]); -int __check_volume(libubi_t libubi, struct ubi_dev_info *dev_info, - const char *test, const char *func, int line, int vol_id, - const struct ubi_mkvol_request *req); -int __check_vol_patt(libubi_t libubi, const char *test, const char *func, - int line, const char *node, uint8_t byte); -int __update_vol_patt(libubi_t libubi, const char *test, const char *func, - int line, const char *node, long long bytes, - uint8_t byte); +extern void __failed(const char *test, const char *func, int line, + const char *failed); +extern int __initial_check(const char *test, int argc, char * const argv[]); +extern int __check_volume(libubi_t libubi, struct ubi_dev_info *dev_info, + const char *test, const char *func, int line, + int vol_id, const struct ubi_mkvol_request *req); +extern int __check_vol_patt(libubi_t libubi, const char *test, const char *func, + int line, const char *node, uint8_t byte); +extern int __update_vol_patt(libubi_t libubi, const char *test, const char *func, + int line, const char *node, long long bytes, + uint8_t byte); #ifdef __cplusplus } |