Kaben123 opened a new pull request, #3396:
URL: https://github.com/apache/nuttx-apps/pull/3396

   The tests cover basic read/write operations, ioctl interface, and log/block 
group management.
   These tests help ensure the reliability and correctness of the mtdlog driver.
   
   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   ## Summary
   
   This pull request adds comprehensive unit tests for the mtdlog driver in 
NuttX apps, located under `testing/drivers/drivertest/`. The new test file 
`drivertest_mtd_log.c` uses the cmocka framework to verify the functionality of 
the mtdlog driver, including:
   
   - Basic read and write operations to `/dev/mtdlog`
   - Validation of ioctl interfaces (block info, log info, log count, group 
count, status)
   - Log entry and block group management
   - Data integrity checks between written and read data
   
   The corresponding build system files (`CMakeLists.txt` and `Makefile`) are 
updated to include the new test when `CONFIG_MTDLOG` is enabled.
   
   ## Impact
   
   - Improves test coverage for the mtdlog driver
   - No impact on production code; changes are limited to test sources and 
build scripts
   - No breaking changes or compatibility issues
   
   ## Testing
   
   - The tests are built and executed with `CONFIG_MTDLOG` enabled
   - All test cases pass on supported hardware and emulation environments
   - Example test output:
     ```
     [==========] Running 2 test(s).
     [ RUN      ] drivertest_mtdlog_case1
     [       OK ] drivertest_mtdlog_case1
     [ RUN      ] drivertest_mtdlog_case2
     [       OK ] drivertest_mtdlog_case2
     [==========] 2 test(s) run.
     [  PASSED  ] 2 test(s).
     ```
   
   
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to