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

chore(libsinsp/test): use GTEST_SKIP to track disabled tests #2158

Conversation

therealbobo
Copy link
Contributor

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:

Instead of using an ifdef around test functions, we could use GTEST_SKIP to avoid losing sight of disabled tests.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.44%. Comparing base (385822d) to head (e064c96).
Report is 14 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2158   +/-   ##
=======================================
  Coverage   75.44%   75.44%           
=======================================
  Files         265      265           
  Lines       34057    34057           
  Branches     5801     5801           
=======================================
  Hits        25695    25695           
  Misses       8362     8362           
Flag Coverage Δ
libsinsp 75.44% <ø> (ø)

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.

Copy link

github-actions bot commented Nov 13, 2024

Perf diff from master - unit tests

     3.75%     -1.14%  [.] sinsp_parser::process_event
     2.58%     -1.03%  [.] sinsp::fetch_next_event
     7.62%     +0.99%  [.] sinsp_evt::get_type
     3.57%     +0.45%  [.] gzfile_read
     1.00%     -0.41%  [.] sinsp_evt::get_param
     0.34%     +0.22%  [.] sinsp_parser::parse_open_openat_creat_exit
     1.06%     +0.21%  [.] sinsp_evt::get_direction
     0.47%     +0.20%  [.] std::_Hashtable<conversion_key, std::pair<conversion_key const, conversion_info>, std::allocator<std::pair<conversion_key const, conversion_info> >, std::__detail::_Select1st, std::equal_to<conversion_key>, std::hash<conversion_key>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::_M_find_before_node
     1.38%     +0.20%  [.] libsinsp::sinsp_suppress::process_event
     1.20%     -0.20%  [.] sinsp_evt::get_ts

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.0158         +0.0158           145           147           145           147
BM_sinsp_split_median                                          +0.0181         +0.0181           144           147           144           147
BM_sinsp_split_stddev                                          -0.4089         -0.4093             1             0             1             0
BM_sinsp_split_cv                                              -0.4181         -0.4185             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  -0.0107         -0.0107            57            56            57            56
BM_sinsp_concatenate_paths_relative_path_median                -0.0131         -0.0131            57            56            57            56
BM_sinsp_concatenate_paths_relative_path_stddev                -0.3897         -0.3901             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_cv                    -0.3831         -0.3835             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     +0.0011         +0.0011            24            24            24            24
BM_sinsp_concatenate_paths_empty_path_median                   +0.0007         +0.0007            24            24            24            24
BM_sinsp_concatenate_paths_empty_path_stddev                   +0.3904         +0.3889             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       +0.3889         +0.3874             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  -0.0333         -0.0333            57            55            57            55
BM_sinsp_concatenate_paths_absolute_path_median                -0.0376         -0.0376            57            55            57            55
BM_sinsp_concatenate_paths_absolute_path_stddev                -0.5865         -0.5859             1             0             1             0
BM_sinsp_concatenate_paths_absolute_path_cv                    -0.5722         -0.5717             0             0             0             0
BM_sinsp_split_container_image_mean                            +0.0063         +0.0063           388           390           388           390
BM_sinsp_split_container_image_median                          +0.0059         +0.0059           388           391           388           391
BM_sinsp_split_container_image_stddev                          -0.2570         -0.2576             2             2             2             2
BM_sinsp_split_container_image_cv                              -0.2617         -0.2622             0             0             0             0

@FedeDP
Copy link
Contributor

FedeDP commented Nov 13, 2024

/milestone 0.20.0

Left a suggestion/fix :)

@poiana poiana added this to the 0.20.0 milestone Nov 13, 2024
@therealbobo therealbobo force-pushed the therealbobo-skip-flaky-tests branch from d687fa6 to b343396 Compare November 13, 2024 10:13
FedeDP
FedeDP previously approved these changes Nov 28, 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
Copy link
Contributor

poiana commented Nov 28, 2024

LGTM label has been added.

Git tree hash: 9e848f1b7055baf0cc8932454db421995de107c8

@FedeDP
Copy link
Contributor

FedeDP commented Nov 28, 2024

Uh system deps builds on arm64 are failing with:

/__w/libs/libs/userspace/libsinsp/test/async_key_value_source.ut.cpp:341:2: error: 'GTEST_SKIP' was not declared in this scope
  GTEST_SKIP() << R"(This test usually fails like this when runned with sanitizers on arm64:

Care to give it a look so that we can merge this one?
I think it depends by the gtest version provided by github-arm64-2c-8gb runner :/

@@ -17,6 +17,8 @@ jobs:
build-libs-linux:
name: build-libs-linux-${{ matrix.arch }} 😁 (${{ matrix.name }})
runs-on: ${{ (matrix.arch == 'arm64' && 'github-arm64-2c-8gb') || 'ubuntu-22.04' }}
container:
Copy link
Contributor

Choose a reason for hiding this comment

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

@therealbobo therealbobo force-pushed the therealbobo-skip-flaky-tests branch from cc3566c to 546b202 Compare December 6, 2024 14:08
@@ -17,6 +17,8 @@ jobs:
build-libs-linux:
name: build-libs-linux-${{ matrix.arch }} 😁 (${{ matrix.name }})
runs-on: ${{ (matrix.arch == 'arm64' && 'github-arm64-2c-8gb') || 'ubuntu-22.04' }}
container:
Copy link
Contributor

Choose a reason for hiding this comment

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

At this point, do we even need the container? I mean, we already run on ubuntu-22.04 on x86 and arm64.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd remove the container directive.
Also, remember to add sudo before install deps steps

Copy link
Contributor

@FedeDP FedeDP Jan 7, 2025

Choose a reason for hiding this comment

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

Why did you use container image ubuntu-22.04? can't we run directly on runner runs-on ?

Copy link
Contributor

Choose a reason for hiding this comment

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

/hold

Copy link
Contributor

Choose a reason for hiding this comment

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

There is a grpc-related sanitizer issue otherwise :/ grpc/grpc#22783

It's ok with the container to workaround it!
/unhold

@therealbobo therealbobo force-pushed the therealbobo-skip-flaky-tests branch 3 times, most recently from 3d31620 to d666250 Compare December 6, 2024 14:39
@therealbobo therealbobo force-pushed the therealbobo-skip-flaky-tests branch from 78bb159 to a733fe3 Compare January 8, 2025 10:04
@poiana poiana removed the lgtm label Jan 8, 2025
@poiana poiana requested a review from leogr January 8, 2025 10:04
FedeDP
FedeDP previously approved these changes Jan 8, 2025
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 Jan 8, 2025
@poiana
Copy link
Contributor

poiana commented Jan 8, 2025

LGTM label has been added.

Git tree hash: c11c83b5fafa54f8cfa75f195dbc6fda58980268

@therealbobo therealbobo force-pushed the therealbobo-skip-flaky-tests branch from a733fe3 to c4bf082 Compare January 8, 2025 10:24
@therealbobo therealbobo force-pushed the therealbobo-skip-flaky-tests branch from c4bf082 to f598e25 Compare January 8, 2025 11:04
@poiana poiana removed the lgtm label Jan 8, 2025
@poiana poiana requested a review from FedeDP January 8, 2025 11:04
FedeDP
FedeDP previously approved these changes Jan 8, 2025
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 Jan 8, 2025
@poiana
Copy link
Contributor

poiana commented Jan 8, 2025

LGTM label has been added.

Git tree hash: 2b2f0561c42922c1829682079e318633d092a424

@poiana
Copy link
Contributor

poiana commented Jan 8, 2025

[APPROVALNOTIFIER] This PR is APPROVED

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

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

leogr
leogr previously approved these changes Jan 8, 2025
@poiana
Copy link
Contributor

poiana commented Jan 8, 2025

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.

📝 Please follow instructions in the contributing guide to update your commits with the DCO

Full details of the Developer Certificate of Origin can be found at developercertificate.org.

The list of commits missing DCO signoff:

  • e064c96 Revert "fix(ci): always build on ubuntu 22.04"

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@poiana
Copy link
Contributor

poiana commented Jan 8, 2025

New changes are detected. LGTM label has been removed.

@therealbobo therealbobo closed this Jan 8, 2025
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