Commit 4110d879 authored by Ramon Nou's avatar Ramon Nou Committed by Ramon Nou
Browse files

opendir / rmdir errors

parent c1ad07f9
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -50,11 +50,11 @@ gkfs:
  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"
    - 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
+9 −0
Original line number Diff line number Diff line
@@ -189,6 +189,15 @@ def test_mkdir(gkfs_daemon, gkfs_client):
        assert d.d_name == e[0]
        assert d.d_type == e[1]

    # Try to open a file as a dir
    ret = gkfs_client.opendir(file_a)
    assert ret.dirp is None
    assert ret.errno == errno.ENOTDIR

    # Try to remove a non empty dir
    ret = gkfs_client.rmdir(topdir)
    assert ret.retval == -1
    assert ret.errno == errno.ENOTEMPTY

    return