gulrak / filesystem

An implementation of C++17 std::filesystem for C++11 /C++14/C++17/C++20 on Windows, macOS, Linux and FreeBSD.
MIT License
1.34k stars 173 forks source link

Disable some tests if running on root. #118

Closed phprus closed 3 years ago

phprus commented 3 years ago

On root user:

-------------------------------------------------------------------------------
fs.op.permissions - permissions
-------------------------------------------------------------------------------
/home/.../test/filesystem_test.cpp:2440
...............................................................................

/home/.../test/filesystem_test.cpp:2448: FAILED:
  CHECK_THROWS_AS( fs::resize_file("foo", 1024), fs::filesystem_error )
because no exception was thrown where one was expected:

/home/.../test/filesystem_test.cpp:2449: FAILED:
  CHECK( fs::file_size("foo") == 512 )
with expansion:
  1024 (0x400) == 512 (0x200)

-------------------------------------------------------------------------------
gulrak commented 3 years ago

Thank you, this was an issue on the BSD CI runs as well.