-
Notifications
You must be signed in to change notification settings - Fork 15
test(crasht): fix CentOS SIGPIPE tests #1233
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
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1233 +/- ##
=======================================
Coverage 71.65% 71.65%
=======================================
Files 354 354
Lines 56053 56063 +10
=======================================
+ Hits 40162 40172 +10
Misses 15891 15891
🚀 New features to boost your workflow:
|
/merge |
View all feedbacks in Devflow UI.
The expected merge time in
Tests failed on this commit e16f165: What to do next?
|
|
||
// Use raw write() syscall instead of Rust's write_all() to avoid MSG_NOSIGNAL | ||
let writer_raw_fd = writer_fd.as_raw_fd(); | ||
let write_result = | ||
unsafe { libc::write(writer_raw_fd, b"Hello".as_ptr() as *const libc::c_void, 5) }; | ||
|
||
if write_result != -1 { | ||
anyhow::bail!("Expected write to fail with SIGPIPE, but it succeeded"); |
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.
We discussed offline moving this into its own function, and adding a test that it does indeed raise a SIGPIPE
. Followup work since this PR is needed to unblock CI.
/merge |
View all feedbacks in Devflow UI.
The expected merge time in
|
What does this PR do?
SIGPIPE
tests in place to make sure that the crashtracker is not bothered bySIGPIPE
.SIGPIPE
is even emitted (this is done by opening a pipe, closing one end, and writing to the other)SIGPIPE
being emitted by writing to socket withMSG_NOSIGNAL
flag.SIGPIPE
Changing the write to the pipe from writing to Rust
UnixStream
to using raw system callwrite()
to the write fd, without wrapping it inUnixStream
fixes the test.SIGPIPE
because we are writing to a socket that has been dropped from the other sideSIGPIPE
SIGPIPE
doesnt affect the crashtracker.Motivation
We received reports of bin tests,
sigpipe
andsigpipe_sigstack
failing both on main and feature branches.Additional Notes
Anything else we should know when reviewing?
How to test the change?
Describe here in detail how the change can be validated.