After long period of silence I am writing this post to summarize my last weeks efforts on RTEMS coverage.
Because coverage in core profile is near 100%, I and my mentor decided to start work on developmental parts of RTEMS. I looked on analysis results and tried to find out where are the largest uncovered ranges. My choice was RFS.
RFS is acronym of RTEMS File System. Some informations about this are here. Base filesystem in RTEMS is IMFS = in memory file system. Other filesystems can be mounted in IMFS.
First of all I had learned how to mount filesystem and how to register RAM disk. This takes me a lot, I tried to understand everything, but there was still some errors and failures. Fortunately, this part of work on coverage of filesystems is done and you don't have to struggle with registering RAM and mounting filesystem on your own.
In directory rtems/testsuites/fstests there are set of tests of filesystems. There are also some support files, which allow you to focus on your unexecuted ranges and don't pay attention to rest. In directory rtems/testsuites/fstests/support there are files responsible for registration of RAM disk, configuration of RTEMS, initialize file system. In directories named like FILESYSTEM_support (mrfs_support, imfs_support, mdosfs_support, etc.) are files related to specific file system. Thanks to these support files you have only write your test() function.
This approach allow to reuse test() in different file systems. You simply have to make directory mrfs_TESTNAME - for mounted RFS, mdosfs_TESTNAME - for mounted DOS file system, etc. and write makefile which takes appropriate support files. There are lot of tests in fstests and you can follow it to make your own filesystem test.
My next post would be about test on fpathconf() which also show some lacks in coverage tools. But it is another story :)