Loading .gitlab-ci.yml +6 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,12 @@ gkfs: interruptible: true needs: [] script: # Change config.hpp with sed to enable extra features - sed -i 's/\/\/constexpr auto use_atime = false;/constexpr auto use_atime = true;/g' "${CI_PROJECT_DIR}/src/config.hpp" - sed -i 's/\/\/constexpr auto use_ctime = false;/constexpr auto use_ctime = true;/g' "${CI_PROJECT_DIR}/src/config.hpp" - sed -i 's/\/\/constexpr auto use_mtime = false;/constexpr auto use_mtime = true;/g' "${CI_PROJECT_DIR}/src/config.hpp" - sed -i 's/\/\/constexpr auto use_link_cnt = false;/constexpr auto use_link_cnt = true;/g' "${CI_PROJECT_DIR}/src/config.hpp" - sed -i 's/\/\/constexpr auto use_blocks = false;/constexpr auto use_blocks = true;/g' "${CI_PROJECT_DIR}/src/config.hpp" - mkdir -p ${BUILD_PATH} && cd ${BUILD_PATH} - cmake -Wdev Loading include/client/open_file_map.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ #include <mutex> #include <memory> #include <atomic> #include <array> namespace gkfs::filemap { Loading tests/integration/coverage/test_error_operations.py +15 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later # ################################################################################ from sre_parse import State import harness from pathlib import Path import errno Loading Loading @@ -80,6 +81,9 @@ def test_open_error(gkfs_daemon, gkfs_client): assert ret.retval == -1 assert ret.errno == errno.ENOENT ret = gkfs_client.open(file3, os.O_CREAT | stat.S_IFSOCK | os.O_EXCL | os.O_WRONLY) assert ret.retval == 10000 def test_access_error(gkfs_daemon, gkfs_client): file = gkfs_daemon.mountdir / "file" Loading Loading @@ -123,5 +127,16 @@ def test_statfs(gkfs_daemon, gkfs_client): assert ret.statfsbuf.f_ffree == 0 def test_statvfs(gkfs_daemon, gkfs_client): # Statfs check most of the outputs ret = gkfs_client.statvfs(gkfs_daemon.mountdir) assert ret.retval == 0 assert ret.statvfsbuf.f_bsize != 0 assert ret.statvfsbuf.f_blocks != 0 assert ret.statvfsbuf.f_bfree != 0 assert ret.statvfsbuf.f_bavail != 0 assert ret.statvfsbuf.f_files == 0 assert ret.statvfsbuf.f_ffree == 0 No newline at end of file tests/integration/harness/CMakeLists.txt +1 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,7 @@ add_executable(gkfs.io gkfs.io/unlink.cpp gkfs.io/access.cpp gkfs.io/statfs.cpp gkfs.io/statvfs.cpp ) include(FetchContent) Loading tests/integration/harness/gkfs.io/commands.hpp +3 −0 Original line number Diff line number Diff line Loading @@ -102,6 +102,9 @@ access_init(CLI::App& app); void statfs_init(CLI::App& app); void statvfs_init(CLI::App& app); // UTIL void file_compare_init(CLI::App& app); Loading Loading
.gitlab-ci.yml +6 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,12 @@ gkfs: interruptible: true needs: [] script: # Change config.hpp with sed to enable extra features - sed -i 's/\/\/constexpr auto use_atime = false;/constexpr auto use_atime = true;/g' "${CI_PROJECT_DIR}/src/config.hpp" - sed -i 's/\/\/constexpr auto use_ctime = false;/constexpr auto use_ctime = true;/g' "${CI_PROJECT_DIR}/src/config.hpp" - sed -i 's/\/\/constexpr auto use_mtime = false;/constexpr auto use_mtime = true;/g' "${CI_PROJECT_DIR}/src/config.hpp" - sed -i 's/\/\/constexpr auto use_link_cnt = false;/constexpr auto use_link_cnt = true;/g' "${CI_PROJECT_DIR}/src/config.hpp" - sed -i 's/\/\/constexpr auto use_blocks = false;/constexpr auto use_blocks = true;/g' "${CI_PROJECT_DIR}/src/config.hpp" - mkdir -p ${BUILD_PATH} && cd ${BUILD_PATH} - cmake -Wdev Loading
include/client/open_file_map.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ #include <mutex> #include <memory> #include <atomic> #include <array> namespace gkfs::filemap { Loading
tests/integration/coverage/test_error_operations.py +15 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later # ################################################################################ from sre_parse import State import harness from pathlib import Path import errno Loading Loading @@ -80,6 +81,9 @@ def test_open_error(gkfs_daemon, gkfs_client): assert ret.retval == -1 assert ret.errno == errno.ENOENT ret = gkfs_client.open(file3, os.O_CREAT | stat.S_IFSOCK | os.O_EXCL | os.O_WRONLY) assert ret.retval == 10000 def test_access_error(gkfs_daemon, gkfs_client): file = gkfs_daemon.mountdir / "file" Loading Loading @@ -123,5 +127,16 @@ def test_statfs(gkfs_daemon, gkfs_client): assert ret.statfsbuf.f_ffree == 0 def test_statvfs(gkfs_daemon, gkfs_client): # Statfs check most of the outputs ret = gkfs_client.statvfs(gkfs_daemon.mountdir) assert ret.retval == 0 assert ret.statvfsbuf.f_bsize != 0 assert ret.statvfsbuf.f_blocks != 0 assert ret.statvfsbuf.f_bfree != 0 assert ret.statvfsbuf.f_bavail != 0 assert ret.statvfsbuf.f_files == 0 assert ret.statvfsbuf.f_ffree == 0 No newline at end of file
tests/integration/harness/CMakeLists.txt +1 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,7 @@ add_executable(gkfs.io gkfs.io/unlink.cpp gkfs.io/access.cpp gkfs.io/statfs.cpp gkfs.io/statvfs.cpp ) include(FetchContent) Loading
tests/integration/harness/gkfs.io/commands.hpp +3 −0 Original line number Diff line number Diff line Loading @@ -102,6 +102,9 @@ access_init(CLI::App& app); void statfs_init(CLI::App& app); void statvfs_init(CLI::App& app); // UTIL void file_compare_init(CLI::App& app); Loading