-
Notifications
You must be signed in to change notification settings - Fork 164
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(libsinsp_e2e): make tests more stable #2075
fix(libsinsp_e2e): make tests more stable #2075
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: therealbobo The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Perf diff from master - unit tests
Heap diff from master - unit tests
Heap diff from master - scap file
Benchmarks diff from master
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2075 +/- ##
==========================================
- Coverage 73.58% 73.58% -0.01%
==========================================
Files 253 253
Lines 31869 31869
Branches 5653 5640 -13
==========================================
- Hits 23452 23451 -1
+ Misses 8416 8401 -15
- Partials 1 17 +16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
4f37905
to
6c053fa
Compare
a12bc9c
to
adb8c8b
Compare
test/libsinsp_e2e/event_capture.h
Outdated
capturing.stop_capture(); | ||
// This lseek is just used to be sure that all the events | ||
// created in the run_function were consumed. | ||
lseek(-1,-1,-1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd use something less error prone (ie: perhaps there can be something else in the system that calls lseek(-1
):
- open a "lock file" like
m_fd = open("/tmp/__test_running")
- at the end,
close(m_fd)
- wait for the close syscall event on m_fd for our TID
WDYT? It seems easier to understand and safer.
f4ebf18
to
899d1a8
Compare
/milestone TBD |
602f84c
to
e6a89aa
Compare
Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com>
e6a89aa
to
66c8788
Compare
What type of PR is this?
/kind bug
Any specific area of the project related to this PR?
/area tests
Does this PR require a change in the driver versions?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: