Commit 655b1f8b authored by Alberto Miranda's avatar Alberto Miranda ♨️
Browse files

Merge branch 'rnou/216-increase-testing-coverage' into 'master'

Resolve "increase testing coverage"

This MR increases testing coverage significantly by including additional tests and implementing basic syscall testing.

It also fixes the following issues:
* Include `<array>` to compile with GCC 12.1
* Solved SIGSEV in fchdir (When debug is enabled)

Closes #216

See merge request !141
parents fcf7fb60 b1b3e519
Loading
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -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}/include/config.hpp"
    - sed -i 's/constexpr auto use_ctime = false;/constexpr auto use_ctime = true;/g' "${CI_PROJECT_DIR}/include/config.hpp"
    - sed -i 's/constexpr auto use_mtime = false;/constexpr auto use_mtime = true;/g' "${CI_PROJECT_DIR}/include/config.hpp"
    - sed -i 's/constexpr auto use_link_cnt = false;/constexpr auto use_link_cnt = true;/g' "${CI_PROJECT_DIR}/include/config.hpp"
    - sed -i 's/constexpr auto use_blocks = false;/constexpr auto use_blocks = true;/g' "${CI_PROJECT_DIR}/include/config.hpp"
    - mkdir -p ${BUILD_PATH} && cd ${BUILD_PATH}
    - cmake
      -Wdev
@@ -131,7 +137,7 @@ gkfs:integration:
  needs: ['gkfs']
  parallel:
    matrix:
      - SUBTEST: [ data, directories, operations, position, shell, status ]
      - SUBTEST: [ data, status, syscalls, directories, operations, position, shell ]

  script:
    ## run tests
@@ -227,6 +233,7 @@ gkfs:unit:
    - ctest -j $(nproc) -L unit::all --output-junit report.xml

    ## capture coverage information
    - cd ${BUILD_PATH}
    - ${CI_SCRIPTS_DIR}/coverage.sh
          --verbose
          --capture unit
+7 −1
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### New
- Additional tests to increase code coverage ([!141](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/141)).
- GKFS_ENABLE_UNUSED_FUNCTIONS added to disable code to increase code coverage.
### Changed
- Support parallelism for path resolution tests ([!145](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/145)).
- Support parallelism for symlink tests ([!147](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/147)).
@@ -14,7 +16,11 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### Fixed
- Using `unlink` now fails if it is a directory unless the `AT_REMOVEDIR` flag is used (POSIX compliance) ([!139](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/139)).
- Support glibc-2.34 or newer with syscall_intercept [!146](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/146)).

- Additional `#ifdef` to remove unused code ([!141](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/141))
### Removed
### Fixed
- Using `unlink` now fails if it is a directory unless the `AT_REMOVEDIR` flag is used (POSIX compliance) ([!139](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/139)).
- fchdir generate a SIGSEV in debug mode (due to log) ([!141](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/141))
## [0.9.1] - 2022-04-29

### New
+2 −0
Original line number Diff line number Diff line
@@ -178,6 +178,8 @@ if (GKFS_ENABLE_AGIOS)
    find_package(AGIOS REQUIRED)
endif ()

option(GKFS_ENABLE_UNUSED_FUNCTIONS "Enable unused functions compilation" OFF)

option(GKFS_ENABLE_PARALLAX "Enable Parallax db backend" OFF)
option(GKFS_ENABLE_ROCKSDB "Enable ROCKSDB backend" ON)

+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
#include <mutex>
#include <memory>
#include <atomic>
#include <array>

namespace gkfs::filemap {

+2 −0
Original line number Diff line number Diff line
@@ -44,8 +44,10 @@ bool_to_merc_bool(bool state);
std::string
get_my_hostname(bool short_hostname = false);

#ifdef GKFS_ENABLE_UNUSED_FUNCTIONS
std::string
get_host_by_name(const std::string& hostname);
#endif

} // namespace gkfs::rpc

Loading