Guillaume Winter
12/19/2024, 1:53 PMmaster
branch, I get 20 test failures :
75% tests passed, 20 tests failed out of 81
Total Test time (real) = 1299.64 sec
The following tests FAILED:
13 - osquery_distributed_tests-test (Failed)
17 - osquery_tables_events_tests_fileeventstests-test (Failed)
18 - osquery_tables_networking_tests_networkingtablestests-test (Failed)
19 - osquery_tables_networking_tests_wifitests-test (Failed)
23 - osquery_tables_system_darwin_tests-test (SEGFAULT)
29 - osquery_remote_transports_remotetransportstlstests-test (Failed)
34 - osquery_config_tests-test (Failed)
35 - osquery_config_tests_packs-test (Failed)
37 - osquery_utils_aws_tests-test (Failed)
52 - osquery_filesystem_filesystemtests-test (Failed)
62 - plugins_config_tests_tlsconfigtests-test (Failed)
63 - plugins_config_parsers_tests_decoratorstests-test (Failed)
64 - plugins_config_parsers_tests_eventsparsertests-test (Failed)
65 - plugins_config_parsers_tests_filepathstests-test (Failed)
66 - plugins_config_parsers_tests_optionstests-test (Failed)
67 - plugins_config_parsers_tests_viewstests-test (SEGFAULT)
75 - plugins_logger_tests_tlsloggertests-test (Failed)
77 - plugins_remote_enroll_tlsenrolltests-test (Failed)
79 - tools_tests_testosqueryi (Failed)
81 - tests_integration_tables-test (Failed)
I build with the following commands:
cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DOSQUERY_BUILD_TESTS=ON ..
cmake --build . -j $(sysctl -n hw.ncpu)
CTEST_OUTPUT_ON_FAILURE=1 cmake --build . --target test -j $(sysctl -n hw.ncpu)
I can attach a full log if it's relevant.Stefano Bonicatti
12/19/2024, 2:00 PMStep 1: Install macOS prerequisites
https://osquery.readthedocs.io/en/latest/development/building/
You have to install the "optional" (if not running tests) python packages.Stefano Bonicatti
12/19/2024, 2:00 PMStefano Bonicatti
12/19/2024, 2:03 PMctest -V -R <testname>
Admittedly some that SEGFAULT there it's strange that python is involved at all.Guillaume Winter
12/19/2024, 2:03 PMGuillaume Winter
12/19/2024, 2:05 PMCTEST_OUTPUT_ON_FAILURE=1
is attached:Stefano Bonicatti
12/19/2024, 2:06 PMCannot read --enroll_secret: [Errno 2] No such file or directory: '/Users/myself/src/osquery/build/test_configs/test_enroll_secret.txt'
Stefano Bonicatti
12/19/2024, 2:06 PMStefano Bonicatti
12/19/2024, 2:07 PMStefano Bonicatti
12/19/2024, 2:07 PMGuillaume Winter
12/19/2024, 2:07 PMStefano Bonicatti
12/19/2024, 2:07 PMcmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DOSQUERY_BUILD_TESTS=ON ..
cmake --build . -j $(sysctl -n hw.ncpu)
Stefano Bonicatti
12/19/2024, 2:08 PMGuillaume Winter
12/19/2024, 2:10 PMcmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DOSQUERY_BUILD_TESTS=ON ..
-- osquery version: 5.14.1-24-g25236d899-dirty
-- Found ccache: /opt/homebrew/bin/ccache
-- Found clang-format: /opt/homebrew/bin/clang-format
-- Build type: Debug
-- Shared libraries: OFF
-- Importing: source/lz4
-- Importing: source/augeas/gnulib
-- Importing: source/augeas
-- Importing formula: formula/openssl
CMake Warning (dev) at /opt/homebrew/share/cmake/Modules/ExternalProject/shared_internal_commands.cmake:1276 (message):
The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
not set. The policy's OLD behavior will be used. When using a URL
download, the timestamps of extracted files should preferably be that of
the time of extraction, otherwise code that depends on the extracted
contents might not be rebuilt if the URL changes. The OLD behavior
preserves the timestamps from the archive instead, but this is usually not
what you want. Update your project to the NEW behavior or specify the
DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
robustness issue.
Call Stack (most recent call first):
/opt/homebrew/share/cmake/Modules/ExternalProject.cmake:3041 (_ep_add_download_command)
libraries/cmake/formula/openssl/CMakeLists.txt:202 (ExternalProject_Add)
libraries/cmake/formula/openssl/CMakeLists.txt:238 (opensslMain)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Importing: source/boost
-- osquery: boost::context is using the fcontext backend
-- Importing: source/bzip2
-- Importing: source/gflags
-- Importing: source/glog
-- Importing: source/googletest
CMake Deprecation Warning at libraries/cmake/source/googletest/src/CMakeLists.txt:4 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
CMake Deprecation Warning at libraries/cmake/source/googletest/src/googlemock/CMakeLists.txt:45 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
CMake Deprecation Warning at libraries/cmake/source/googletest/src/googletest/CMakeLists.txt:56 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
-- Importing: source/libarchive
-- Importing: source/libmagic
-- Importing: source/librdkafka
-- Importing: source/linenoise-ng
-- Importing: source/lzma
-- Importing: source/rapidjson
-- Importing: source/rocksdb
-- Importing: source/sleuthkit
-- Importing: source/sqlite
-- Importing: source/thrift
-- Importing: source/yara
-- Importing: source/zlib
-- Importing: source/zstd
-- Importing: source/aws-sdk-cpp
-- Could NOT find cppcheck (missing: CPPCHECK_EXECUTABLE)
-- cppcheck: The executable was not found
-- Configuring done (0.9s)
-- Generating done (3.8s)
-- Build files have been written to: /Users/myself/src/osquery/build
Guillaume Winter
12/19/2024, 2:10 PMStefano Bonicatti
12/19/2024, 2:12 PMninja
is much faster, although a scratch build may be slower due to openssl
build system not being parallelized in that case.Guillaume Winter
12/19/2024, 2:13 PMStefano Bonicatti
12/19/2024, 2:14 PMGuillaume Winter
12/19/2024, 2:16 PMGuillaume Winter
12/19/2024, 2:18 PMtest_enroll_secret.txt
is now present in the directoryStefano Bonicatti
12/19/2024, 2:20 PMGuillaume Winter
12/19/2024, 2:22 PMStefano Bonicatti
12/19/2024, 2:22 PMGuillaume Winter
12/19/2024, 2:24 PMStefano Bonicatti
12/19/2024, 2:27 PMGuillaume Winter
12/19/2024, 2:28 PM13/81 Test #13: osquery_distributed_tests-test ........................................ Passed 1.45 sec
looks better than last time !Guillaume Winter
12/19/2024, 2:44 PM100% tests passed, 0 tests failed out of 81
Total Test time (real) = 947.55 sec
yay !
Thanks a lot for your help @Stefano Bonicatti!
I can now move forward on my PR