fix(libscap): wire savefile converter objects into the savefile engine#3011
fix(libscap): wire savefile converter objects into the savefile engine#3011immanuwell wants to merge 1 commit into
Conversation
Signed-off-by: immanuwell <pchpr.00@list.ru>
|
Welcome @immanuwell! It looks like this is your first PR to falcosecurity/libs 🎉 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: immanuwell The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Perf diff from master - unit testsHeap diff from master - unit testsHeap diff from master - scap fileBenchmarks diff from master |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3011 +/- ##
=======================================
Coverage 75.65% 75.65%
=======================================
Files 299 299
Lines 32936 32936
Branches 5118 5118
=======================================
Hits 24919 24919
Misses 8017 8017
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/retest |
/kind bug
/area build
/area libscap-engine-savefile
/area tests
What this PR does / why we need it:
This fixes a real build break in the documented
libscap_testflow.scap_engine_savefilewas pulling the converter OBJECT library viatarget_link_libraries(). With Unix Makefiles that leaveslibscap_testin a bad spot,make libscap_testcan fail withNo rule to make target ... converter.cpp.o. Kinda sneaky.This switches the savefile engine to consume those object files through
target_sources($<TARGET_OBJECTS:...>), so the objects are wired into the static archive the right way.Which issue(s) this PR fixes:
None found.
Special notes for your reviewer:
Repro:
cmake -S . -B build-libscap-check \ -DUSE_BUNDLED_DEPS=ON \ -DCREATE_TEST_TARGETS=ON \ -DBUILD_DRIVER=OFF \ -DENABLE_LIBSCAP_TESTS=ON cmake --build build-libscap-check --target libscap_test -j2Before this patch, the build can fail with
No rule to make target ... scap_savefile_converter.dir/converter.cpp.o.After this patch,
libscap_testbuilds ok,./build-libscap-check/test/libscap/libscap_testpasses, and a cleanscapbuild still works.Does this PR introduce a user-facing change?: