test failure on latest commit (removeAll(NON_EXISTANT_PATH_BASE) == -1)
Hi,
Attempting to build the latest commit with GNU Guix, I get:
starting phase `check'
Running tests...
/gnu/store/yh3yl7hzaa1ig3vz5gwgmbxic698nnsx-cmake-minimal-3.24.2/bin/ctest --force-new-ctest-process
Test project /tmp/guix-build-dhtnet-0.0.1-0.8b6e99f.drv-0/build
Start 1: tests_certstore
1/2 Test #1: tests_certstore .................. Passed 13.18 sec
Start 2: tests_fileutils
2/2 Test #2: tests_fileutils ..................***Failed 0.02 sec
.F...
!!!FAILURES!!!
Test Results:
Run: 4 Failures: 1 Errors: 0
1) test: dhtnet::fileutils::test::FileutilsTest::testCheckDir (F) line: 100 /tmp/guix-build-dhtnet-0.0.1-0.8b6e99f.drv-0/source/tests/testFileutils.cpp
assertion failed
- Expression: removeAll(NON_EXISTANT_PATH_BASE) == -1
50% tests passed, 1 tests failed out of 2
Total Test time (real) = 13.20 sec
The following tests FAILED:
2 - tests_fileutils (Failed)
Errors while running CTest
make: *** [Makefile:74: test] Error 8
Test suite failed, dumping logs.
error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("test" "-j" "4") exit-status: 2 term-signal: #f stop-signal: #f>
phase `check' failed after 13.3 seconds
Looking at the source, it seems like removeAll is expected to return -1 upon error (removing nonexistant path?), but that doesn't happen for some reason:
CPPUNIT_ASSERT(removeAll(NON_EXISTANT_PATH_BASE) == 0);
CPPUNIT_ASSERT(!isDirectory(NON_EXISTANT_PATH_BASE));
//remove an non existent directory
CPPUNIT_ASSERT(removeAll(NON_EXISTANT_PATH_BASE) == -1);