I created a branch to start working on code coverage support and I found that test_extended.py was failing on my machine (no new code yet). The test log is attached, but after some exploring I found that sfind is crashing with a segmentation fault. It is likely that the crash is not being captured by popen(), which makes the assert fail.
I also noticed some warnings while building, which might or might not be related to this, but which should be fixed if we want to eventually enable -Werror:
$ g++ --versiong++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0Copyright (C) 2019 Free Software Foundation, Inc.This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.$ make sfind VERBOSE=1/usr/bin/cmake -P /home/amiranda/var/projects/gekkofs/source/build.manual/CMakeFiles/VerifyGlobs.cmake/usr/bin/cmake -S/home/amiranda/var/projects/gekkofs/source -B/home/amiranda/var/projects/gekkofs/source/build.manual --check-build-system CMakeFiles/Makefile.cmake 0make -f CMakeFiles/Makefile2 sfindmake[1]: Entering directory '/home/amiranda/var/projects/gekkofs/source/build.manual'/usr/bin/cmake -P /home/amiranda/var/projects/gekkofs/source/build.manual/CMakeFiles/VerifyGlobs.cmake/usr/bin/cmake -S/home/amiranda/var/projects/gekkofs/source -B/home/amiranda/var/projects/gekkofs/source/build.manual --check-build-system CMakeFiles/Makefile.cmake 0/usr/bin/cmake -E cmake_progress_start /home/amiranda/var/projects/gekkofs/source/build.manual/CMakeFiles 2make -f CMakeFiles/Makefile2 examples/gfind/CMakeFiles/sfind.dir/allmake[2]: Entering directory '/home/amiranda/var/projects/gekkofs/source/build.manual'make -f examples/gfind/CMakeFiles/sfind.dir/build.make examples/gfind/CMakeFiles/sfind.dir/dependmake[3]: Entering directory '/home/amiranda/var/projects/gekkofs/source/build.manual'cd /home/amiranda/var/projects/gekkofs/source/build.manual && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/amiranda/var/projects/gekkofs/source /home/amiranda/var/projects/gekkofs/source/examples/gfind /home/amiranda/var/projects/gekkofs/source/build.manual /home/amiranda/var/projects/gekkofs/source/build.manual/examples/gfind /home/amiranda/var/projects/gekkofs/source/build.manual/examples/gfind/CMakeFiles/sfind.dir/DependInfo.cmake --color=make[3]: Leaving directory '/home/amiranda/var/projects/gekkofs/source/build.manual'make -f examples/gfind/CMakeFiles/sfind.dir/build.make examples/gfind/CMakeFiles/sfind.dir/buildmake[3]: Entering directory '/home/amiranda/var/projects/gekkofs/source/build.manual'[ 50%] Building CXX object examples/gfind/CMakeFiles/sfind.dir/sfind.cpp.ocd /home/amiranda/var/projects/gekkofs/source/build.manual/examples/gfind && /usr/lib/ccache/g++ -fdiagnostics-color-DGKFS_ENABLE_LOGGING-DHAS_SYMLINKS-DLIBGKFS_LOG_MESSAGE_SIZE=512 -DMAX_INTERNAL_FDS=256 -DMAX_OPEN_FDS=1024 -DSTATX_TYPE=1 -I/home/amiranda/var/projects/gekkofs/source/include -I/home/amiranda/var/projects/gekkofs/source/build.manual/include -ggdb3-O0-ftls-model=initial-exec -Wall-Wextra--pedantic-Wno-unused-parameter-Wno-missing-field-initializers-g-O0-DGKFS_DEBUG_BUILD-DHERMES_DEBUG_BUILD-std=gnu++14 -o CMakeFiles/sfind.dir/sfind.cpp.o -c /home/amiranda/var/projects/gekkofs/source/examples/gfind/sfind.cpp/home/amiranda/var/projects/gekkofs/source/examples/gfind/sfind.cpp: In function ‘void pfind_print_help(pfind_options_t*)’:/home/amiranda/var/projects/gekkofs/source/examples/gfind/sfind.cpp:98:26: warning: format ‘%s’ expects argument of type ‘char*’, but argument 2 has type ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’}[-Wformat=] 98 | "\tworkdir = \"%s\"\n" | ~^ | | | char*/home/amiranda/var/projects/gekkofs/source/examples/gfind/sfind.cpp:101:34: warning: format ‘%s’ expects argument of type ‘char*’, but argument 5 has type ‘int’ [-Wformat=] 101 | "\t-S: num servers = \"%s\"\n" | ~^ | | | char* | %d...... 106 | res->timestamp_file, res->name_pattern, res->num_servers, | ~~~~~~~~~~~~~~~~ | | | int/home/amiranda/var/projects/gekkofs/source/examples/gfind/sfind.cpp: In function ‘pfind_options_t* pfind_parse_args(int, char**, int)’:/home/amiranda/var/projects/gekkofs/source/examples/gfind/sfind.cpp:116:41: warning: ‘void* memset(void*, int, size_t)’ clearing an object of type ‘struct pfind_options_t’ with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess] 116 | memset(res, 0, sizeof(pfind_options_t)); | ^/home/amiranda/var/projects/gekkofs/source/examples/gfind/sfind.cpp:51:16: note: ‘struct pfind_options_t’ declared here 51 | typedef struct { | ^/home/amiranda/var/projects/gekkofs/source/examples/gfind/sfind.cpp:156:26: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’}[-Wsign-compare] 156 | for(auto i = 0; i < strlen(str); i++){ | ~~^~~~~~~~~~~~~/home/amiranda/var/projects/gekkofs/source/examples/gfind/sfind.cpp: In function ‘void dirProcess(std::string, long long unsigned int&, long long unsigned int&, std::queue<std::__cxx11::basic_string<char> >&, unsigned int, unsigned int, pfind_options_t*)’:/home/amiranda/var/projects/gekkofs/source/examples/gfind/sfind.cpp:293:23: warning: comparison of integer expressions of different signedness: ‘long long unsigned int’ and ‘int’ [-Wsign-compare] 293 | while(total_size < n){ | ~~~~~~~~~~~^~~/home/amiranda/var/projects/gekkofs/source/examples/gfind/sfind.cpp: In function ‘int process(pfind_options_t*)’:/home/amiranda/var/projects/gekkofs/source/examples/gfind/sfind.cpp:331:8: warning: unused variable ‘ret’ [-Wunused-variable] 331 | auto ret = 0; | ^~~/home/amiranda/var/projects/gekkofs/source/examples/gfind/sfind.cpp:345:8: warning: unused variable ‘iterations’ [-Wunused-variable] 345 | auto iterations = 0; | ^~~~~~~~~~[100%] Linking CXX executable sfindcd /home/amiranda/var/projects/gekkofs/source/build.manual/examples/gfind && /usr/bin/cmake -E cmake_link_script CMakeFiles/sfind.dir/link.txt --verbose=1/usr/lib/ccache/g++ -fdiagnostics-color-ggdb3-O0-ftls-model=initial-exec -Wall-Wextra--pedantic-Wno-unused-parameter-Wno-missing-field-initializers-g-O0-DGKFS_DEBUG_BUILD-DHERMES_DEBUG_BUILD-ldl CMakeFiles/sfind.dir/sfind.cpp.o -o sfind make[3]: Leaving directory '/home/amiranda/var/projects/gekkofs/source/build.manual'[100%] Built target sfindmake[2]: Leaving directory '/home/amiranda/var/projects/gekkofs/source/build.manual'/usr/bin/cmake -E cmake_progress_start /home/amiranda/var/projects/gekkofs/source/build.manual/CMakeFiles 0make[1]: Leaving directory '/home/amiranda/var/projects/gekkofs/source/build.manual'