]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - apps/tosthreads/apps/TestBlockStorage/TestBlockStorageP.nc
Fix the problem where MicaZ failed the test
[tinyos-2.x.git] / apps / tosthreads / apps / TestBlockStorage / TestBlockStorageP.nc
index 757212794a7fc56147aa6cac13cbc7fe4d5c60aa..316cbece9354112837c1a8083fa938e4c2298d30 100644 (file)
@@ -47,10 +47,15 @@ implementation
   {
     int i;
     error_t error;
+#if defined USE_AT45DB
+    storage_len_t expectedVolumeSize = 262144;
+#elif defined USE_STM25P
+    storage_len_t expectedVolumeSize = 1048576;
+#endif
 
     call Leds.set(1);
 
-    if (call BlockingBlock1.getSize() != 1048576) {
+    if (call BlockingBlock1.getSize() != expectedVolumeSize) {
       call Leds.set(7);
       return;
     }
@@ -61,7 +66,7 @@ implementation
       return;
     }
     
-    for (i = 0; i < 20; i++) {
+    for (i = 0; i < 50; i++) {
       storage_addr_t writeAddr = call Random.rand32() % (call BlockingBlock1.getSize() - sizeof(storage_addr_t));
       storage_len_t len = sizeof(storage_addr_t);
       storage_addr_t readBuf;