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

cleanup(tests): move some scap files under the scap file test suite #2001

Merged
merged 3 commits into from
Aug 27, 2024

Conversation

Andreagit97
Copy link
Member

What type of PR is this?

/kind cleanup

Any specific area of the project related to this PR?

/area tests

Does this PR require a change in the driver versions?

No

What this PR does / why we need it:

This PR moves some scap files under the scap file test suite

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Copy link

github-actions bot commented Aug 9, 2024

Please double check driver/API_VERSION file. See versioning.

/hold

Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
@Andreagit97 Andreagit97 force-pushed the move_scap_file_tests branch from 8b18e21 to a828ecd Compare August 9, 2024 12:17
@poiana poiana added size/M and removed size/XXL labels Aug 9, 2024
@@ -2,3 +2,5 @@

// Absolute path to the scap files dir
#define LIBSINSP_TEST_SCAP_FILES_DIR "${CMAKE_BINARY_DIR}/scap_files/"

#define LIBSINSP_TMP_TEST_SCAP_FILES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/resources/"
Copy link
Member Author

Choose a reason for hiding this comment

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

Before merging it would be great to push this scap-file with the others. @FedeDP probably you are the one with the right permissions

Copy link
Contributor

Choose a reason for hiding this comment

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

Done!

@Andreagit97 Andreagit97 added this to the 0.18.0 milestone Aug 9, 2024
Copy link

github-actions bot commented Aug 9, 2024

Perf diff from master - unit tests

     1.28%     +2.67%  [.] sinsp::fetch_next_event
     5.17%     -2.07%  [.] sinsp_parser::process_event
     6.50%     -1.05%  [.] next
     0.91%     +0.81%  [.] sinsp_evt::get_ts
     2.24%     -0.76%  [.] libsinsp::sinsp_suppress::process_event
     3.60%     -0.75%  [.] gzfile_read
     0.53%     +0.68%  [.] sinsp_parser::event_cleanup
     4.68%     -0.63%  [.] sinsp_evt::load_params
     9.95%     -0.55%  [.] sinsp_parser::reset
     1.21%     -0.54%  [.] std::_Hashtable<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__detail::_Identity, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, true, true> >::find

Heap diff from master - unit tests

peak heap memory consumption: 288B
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

Copy link

codecov bot commented Aug 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.20%. Comparing base (686dfc0) to head (1ba779a).
Report is 33 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2001      +/-   ##
==========================================
+ Coverage   74.08%   74.20%   +0.12%     
==========================================
  Files         253      253              
  Lines       30766    30832      +66     
  Branches     5386     5395       +9     
==========================================
+ Hits        22792    22880      +88     
+ Misses       7946     7925      -21     
+ Partials       28       27       -1     
Flag Coverage Δ
libsinsp 74.20% <100.00%> (+0.12%) ⬆️

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.

Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
@Andreagit97 Andreagit97 force-pushed the move_scap_file_tests branch from 2f6e16f to 6d327b3 Compare August 9, 2024 13:03
@poiana poiana added size/L and removed size/M labels Aug 9, 2024
Copy link

github-actions bot commented Aug 9, 2024

Perf diff from master - unit tests

     6.26%     -0.91%  [.] next
     4.75%     +0.75%  [.] sinsp_evt::get_type
    10.50%     +0.72%  [.] sinsp_parser::reset
     2.85%     -0.58%  [.] scap_event_decode_params
     0.84%     +0.56%  [.] std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>
     1.07%     -0.55%  [.] sinsp_evt::get_param
     1.33%     -0.50%  [.] scap_next
     1.00%     -0.50%  [.] scap_event_has_large_payload
     0.22%     +0.49%  [.] std::vector<sinsp_evt_param, std::allocator<sinsp_evt_param> >::emplace_back<sinsp_evt*, unsigned int&, char const*, unsigned long&>
     0.69%     +0.47%  [.] 0x00000000000e8380

Perf diff from master - scap file

     7.02%     +3.88%  [.] sinsp_filter_check::tostring
     7.01%     +1.94%  [.] sinsp_filter_check::extract
    27.68%     +1.10%  [.] sinsp_filter_check_event::extract_single
     8.58%     -0.74%  [.] rawstring_check::extract_single
     8.17%     -0.63%  [.] sinsp_filter_check_container::extract_single
     7.01%     -0.48%  [.] 0x00000000000a7cf0
     6.95%     -0.47%  [.] std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_realloc_insert<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >
     6.41%     -0.30%  [.] gzfile_read
     7.18%     -0.29%  [.] std::vector<sinsp_evt_param, std::allocator<sinsp_evt_param> >::emplace_back<sinsp_evt*, unsigned int&, char const*, unsigned long&>
     7.00%     -0.23%  [.] sinsp_container_info::~sinsp_container_info

Heap diff from master - unit tests

peak heap memory consumption: 288B
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

Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
@Andreagit97 Andreagit97 force-pushed the move_scap_file_tests branch from 4e74bed to 1ba779a Compare August 27, 2024 08:07
@Andreagit97 Andreagit97 changed the title [WIP] cleanup(tests): move some scap files under the scap file test suite cleanup(tests): move some scap files under the scap file test suite Aug 27, 2024
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 poiana added the lgtm label Aug 27, 2024
@poiana
Copy link
Contributor

poiana commented Aug 27, 2024

LGTM label has been added.

Git tree hash: 5d1a376831c13ca85201ee36ea90da9c9f2cca2a

@poiana
Copy link
Contributor

poiana commented Aug 27, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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:

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 c7d7530 into falcosecurity:master Aug 27, 2024
46 checks passed
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.

4 participants