Simply copying libfuse.
- Fork the main branch and work on your own branch.
- Test before initiating a Pull Request.
- Get approved to get merged.
make build directory
mkdir -p build && cd build
cmake ..
make # cmake --build . is same
normal usage:
./fischl diskpath n -s mountpoint
diskpath must be provided following ./fischl l/n must be provided following diskpath indicating whether to load the exisiting file system or create a new one. for loading:
./fischl diskpath l -s mountpoint
-s is also required because our fs doesn't support multi-threading.
if the diskpath need to be accessed by root:
sudo ./fischl diskpath n -o allow_other -s mountpoint
for debugging:
sudo ./fischl diskpath n -o allow_other -d -s mountpoint
set(TARGET_NAME run_tests)
set(TEST_NAME test_test)
# add test sources here ...
add_executable(${TARGET_NAME}
../lib/fischl.cpp
testfischl.cpp
)
add_executable(${TEST_NAME}
../lib/fischl.cpp
testtest.cpp
)
add_test(NAME ${TARGET_NAME} COMMAND ${TARGET_NAME})
add_test(NAME ${TEST_NAME} COMMAND ${TEST_NAME})
ctest -VVV
ctest -VV #Displays the output from the tests (e.g., stdout or stderr) in addition to the test information.
Test Result will be like this
[cloud-user@ip-172-31-22-147 build]$ ctest -VVV
Test project /home/cloud-user/iloveos/build
Start 1: run_tests
1/1 Test #1: run_tests ........................ Passed 0.00 sec
100% tests passed, 0 tests failed out of 1
Total Test time (real) = 0.01 sec
Failed demonstration
[cloud-user@ip-172-31-22-147 build]$ ctest -VVV
Test project /home/cloud-user/iloveos/build
Start 1: run_tests
1/2 Test #1: run_tests ........................ Passed 0.00 sec
Start 2: test_test
2/2 Test #2: test_test ........................Subprocess aborted***Exception: 0.26 sec
50% tests passed, 1 tests failed out of 2
Total Test time (real) = 0.27 sec
The following tests FAILED:
2 - test_test (Subprocess aborted)
Errors while running CTest
Output from these tests are in: /home/cloud-user/iloveos/build/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.