projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tweaks to nor stress simulation. Save random seed so that we can do better debugging
[yaffs2.git]
/
direct
/
nor_stress.c
diff --git
a/direct/nor_stress.c
b/direct/nor_stress.c
index 4ac10b1c6186f929b0e1ea9f00aca7c353d679f3..b3704583a184ffc7f4f5b03f0285ee48783acd82 100644
(file)
--- a/
direct/nor_stress.c
+++ b/
direct/nor_stress.c
@@
-290,10
+290,11
@@
static int yVerifyFile(const char *fName)
return retval;
}
return retval;
}
-static unsigned long next = 1;
+extern int random_seed;
+
int myrand(void) {
int myrand(void) {
-
next = next
* 1103515245 + 12345;
- return((unsigned)(
next
/65536) % 32768);
+
random_seed = random_seed
* 1103515245 + 12345;
+ return((unsigned)(
random_seed
/65536) % 32768);
}
static void DoUpdateMainFile(void)
}
static void DoUpdateMainFile(void)
@@
-344,13
+345,16
@@
void NorStressTestRun(const char *prefix)
dump_directory_tree(fullPathName);
UpdateCounter(fullPowerUpName,&powerUps,0);
dump_directory_tree(fullPathName);
UpdateCounter(fullPowerUpName,&powerUps,0);
+ dump_directory_tree(fullPathName);
while(1){
UpdateCounter(fullStartName, &cycleStarts,0);
while(1){
UpdateCounter(fullStartName, &cycleStarts,0);
+ dump_directory_tree(fullPathName);
DoVerifyMainFile();
DoUpdateMainFile();
dump_directory_tree(fullPathName);
UpdateCounter(fullEndName,&cycleEnds,0);
DoVerifyMainFile();
DoUpdateMainFile();
dump_directory_tree(fullPathName);
UpdateCounter(fullEndName,&cycleEnds,0);
+ dump_directory_tree(fullPathName);
}
}
}
}