X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=apps%2Ftests%2Fstorage%2FLog%2FRandRWC.nc;h=7e5ae49ae099b3f4106a9c26c54e8d8be8c9fd13;hb=abfb7ab5e9a2190644be34463d37734fa1e9c5d5;hp=ab762de78271413ce077fd68c188132b22340187;hpb=1c69c2534b1513e782e73dfb8af7d8914dad24c2;p=tinyos-2.x.git diff --git a/apps/tests/storage/Log/RandRWC.nc b/apps/tests/storage/Log/RandRWC.nc index ab762de7..7e5ae49a 100644 --- a/apps/tests/storage/Log/RandRWC.nc +++ b/apps/tests/storage/Log/RandRWC.nc @@ -99,6 +99,8 @@ implementation { return b; } + volatile int x; + void setParameters() { len = rand() >> 8; offset = rand() >> 9; @@ -138,7 +140,9 @@ implementation { } event void LogWrite.appendDone(void *buf, storage_len_t y, bool recordsLost, error_t result) { - if (scheck(result)) + if (result == ESIZE) + scheck(call LogWrite.sync()); + else if (scheck(result)) nextWrite(); }