kasjer opened a new pull request, #3430:
URL: https://github.com/apache/mynewt-core/pull/3430

   Unit test was broken in several ways and pass verdict was not reliable.
   
   First of log_offset used for starting walk was never initialized and 
received random data.
   By accident this data had non zero ts_stamp that resulted in expected start 
from the beginning (it stack was different it could look for timestamp instead).
   
   log_last_walk function that is called on each enumerated entry used 
uninitialized lo_index value to report last entry index. The assumption that 
lo_index has means something in this context was also incorrect as this value 
never changes in walk functions. It looks like original code expected this 
value to have index of log entry which it never does.
   
   Code also did not expected that very first entry added to the log will have 
index 0 (which was never modified correctly). To read entry index log_read 
function must be called.
   
   So now walk callback function does read index of the log.
   
   After fixing incorrect code few more conditions are tested.
   - more logs that should not be stored are generated with different log levels
   - logs with log level above threshold are also tested
   - additional check if index of logs increases


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to