libfs contains multiple tests that are run with CMocka, and for convenience, you can include the tests/fs_testutils.h header to access some utility functions to help you write your own tests.