summaryrefslogtreecommitdiff
path: root/tests/ubi-tests/integ.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-06-15 14:01:31 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-06-15 14:02:48 +0300
commite4867287195421ed3c41e15ce292b00b1c0e3649 (patch)
tree65eb1b5b75aae14831647c8af122730dd1b8165b /tests/ubi-tests/integ.c
parenta6a67a71a26d6906c1c1fd12ea7eef9a9c9b4e2d (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/integ.c')
-rw-r--r--tests/ubi-tests/integ.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/ubi-tests/integ.c b/tests/ubi-tests/integ.c
index e0e8bee..f293444 100644
--- a/tests/ubi-tests/integ.c
+++ b/tests/ubi-tests/integ.c
@@ -731,10 +731,8 @@ int main(int argc,char *argv[])
return 1;
}
- initial_seed = getpid();
+ next_seed = initial_seed = seed_random_generator();
printf("Initial seed = %u\n", (unsigned) initial_seed);
- next_seed = initial_seed;
- srand(initial_seed);
load_ubi();
libubi = libubi_open();