Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(build): fix tests build warnings (fatal with -Werror) #2053

Merged
merged 3 commits into from
Sep 11, 2024

Conversation

gnosek
Copy link
Contributor

@gnosek gnosek commented Sep 11, 2024

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area API-version

/area build

/area CI

/area driver-kmod

/area driver-bpf

/area driver-modern-bpf

/area libscap-engine-bpf

/area libscap-engine-gvisor

/area libscap-engine-kmod

/area libscap-engine-modern-bpf

/area libscap-engine-nodriver

/area libscap-engine-noop

/area libscap-engine-source-plugin

/area libscap-engine-savefile

/area libscap

/area libpman

/area libsinsp

/area tests

/area proposals

Does this PR require a change in the driver versions?

/version driver-API-version-major

/version driver-API-version-minor

/version driver-API-version-patch

/version driver-SCHEMA-version-major

/version driver-SCHEMA-version-minor

/version driver-SCHEMA-version-patch

What this PR does / why we need it:

Every time I run a build with -Werror, I run into new and exciting issues. This is another round of shaving yaks just so I can get my own stuff done, so I took the liberty of adding -Werror to the CI driver_test builds.

Which issue(s) this PR fixes:

Fixes #2052

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@gnosek
Copy link
Contributor Author

gnosek commented Sep 11, 2024

cc @Andreagit97 @federico-sysdig

Copy link

github-actions bot commented Sep 11, 2024

Perf diff from master - unit tests

     5.78%     -0.81%  [.] sinsp_evt::get_type
     3.71%     +0.75%  [.] gzfile_read
     1.96%     -0.69%  [.] libsinsp::sinsp_suppress::process_event
     0.78%     -0.57%  [.] sinsp_container_manager::resolve_container
     0.78%     +0.56%  [.] sinsp_parser::parse_context_switch
     6.16%     -0.55%  [.] sinsp::next
     0.17%     +0.46%  [.] sinsp_parser::parse_open_openat_creat_exit
     0.94%     +0.46%  [.] std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>
     0.90%     +0.44%  [.] sinsp_evt::get_ts
     0.17%     +0.41%  [.] sinsp_container_info::sinsp_container_info

Heap diff from master - unit tests

peak heap memory consumption: 0B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Heap diff from master - scap file

peak heap memory consumption: 0B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Benchmarks diff from master

Comparing gbench_data.json to /root/actions-runner/_work/libs/libs/build/gbench_data.json
Benchmark                                                         Time             CPU      Time Old      Time New       CPU Old       CPU New
----------------------------------------------------------------------------------------------------------------------------------------------
BM_sinsp_split_mean                                            +0.0305         +0.0305           146           151           146           151
BM_sinsp_split_median                                          +0.0290         +0.0290           147           151           147           151
BM_sinsp_split_stddev                                          -0.3723         -0.3739             2             1             2             1
BM_sinsp_split_cv                                              -0.3908         -0.3924             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  -0.0423         -0.0423            47            45            47            45
BM_sinsp_concatenate_paths_relative_path_median                -0.0415         -0.0415            47            45            47            45
BM_sinsp_concatenate_paths_relative_path_stddev                +1.7746         +1.7763             1             2             1             2
BM_sinsp_concatenate_paths_relative_path_cv                    +1.8971         +1.8988             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     -0.0183         -0.0183            17            17            17            17
BM_sinsp_concatenate_paths_empty_path_median                   -0.0179         -0.0179            17            17            17            17
BM_sinsp_concatenate_paths_empty_path_stddev                   -0.2557         -0.2557             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       -0.2419         -0.2418             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  -0.0199         -0.0199            49            48            49            48
BM_sinsp_concatenate_paths_absolute_path_median                -0.0455         -0.0455            49            46            49            46
BM_sinsp_concatenate_paths_absolute_path_stddev                +2.5983         +2.5967             1             3             1             3
BM_sinsp_concatenate_paths_absolute_path_cv                    +2.6715         +2.6698             0             0             0             0
BM_sinsp_split_container_image_mean                            +0.0181         +0.0181           344           350           344           350
BM_sinsp_split_container_image_median                          +0.0177         +0.0177           344           350           344           350
BM_sinsp_split_container_image_stddev                          +2.0834         +2.0816             1             2             1             2
BM_sinsp_split_container_image_cv                              +2.0286         +2.0267             0             0             0             0

Copy link

codecov bot commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.57%. Comparing base (215db2d) to head (cae353d).
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2053   +/-   ##
=======================================
  Coverage   73.57%   73.57%           
=======================================
  Files         253      253           
  Lines       31860    31860           
  Branches     5640     5625   -15     
=======================================
  Hits        23442    23442           
+ Misses       8407     8387   -20     
- Partials       11       31   +20     
Flag Coverage Δ
libsinsp 73.57% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Andreagit97
Copy link
Member

Thank you very much for the fixes! I think we will need a rebase after this #2051 but i can take care of it if it's ok for you!

@Andreagit97 Andreagit97 added this to the 0.18.0 milestone Sep 11, 2024
@gnosek
Copy link
Contributor Author

gnosek commented Sep 11, 2024

Thank you very much for the fixes! I think we will need a rebase after this #2051 but i can take care of it if it's ok for you!

Whatever works for you :) I can rebase and clang-format no problem, but I will haunt you if that doesn't make the CI pass ;P

@FedeDP
Copy link
Contributor

FedeDP commented Sep 11, 2024

@gnosek can you rebase? Please make sure to follow https:/falcosecurity/libs/blob/master/Contributing.md#enforce-coding-style- to properly auto-format the code.

@Andreagit97
Copy link
Member

i will do it!

@Andreagit97
Copy link
Member

Done

Copy link
Member

@Andreagit97 Andreagit97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@poiana
Copy link
Contributor

poiana commented Sep 11, 2024

LGTM label has been added.

Git tree hash: 6230dd57c4708461d792cc8b0a56dd8f21700fc2

Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@poiana
Copy link
Contributor

poiana commented Sep 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, FedeDP, gnosek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [Andreagit97,FedeDP,gnosek]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit 6c5c786 into falcosecurity:master Sep 11, 2024
46 of 47 checks passed
@gnosek gnosek deleted the fix-send-recv-data-initializers branch September 13, 2024 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tons of build issues with missing field initializers
4 participants