-
Notifications
You must be signed in to change notification settings - Fork 665
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 mq tests on NetBSD and DragonFly #1624
Conversation
#[cfg(not(any(target_os = "dragonfly", target_os = "netbsd")))] | ||
{ | ||
let new_attr_get = mq_getattr(mqd).unwrap(); | ||
assert_ne!(new_attr_get, new_attr); |
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.
Presumably we could enable this assert for NetBSD and DragonFly as well, but writing the negation of assert_attr_eq
is just painful enough (and IMO low-value enough) that I'd prefer not to do it. :)
NetBSD (and DragonFly, which borrows its implementation) include additional flags beyond O_NONBLOCK in MqAttr, such as the flags passed to mq_open().
04204a0
to
58d7c04
Compare
Once this and rust-lang/libc#2610 are submitted (and it makes it into a libc release used by nix), the enabled tests should be 100% passing on DragonFly. 🎉 |
bors r+ |
1624: Fix mq tests on NetBSD and DragonFly r=asomers a=rtzoeller NetBSD (and DragonFly, which borrows its implementation) include additional flags beyond O_NONBLOCK in MqAttr, such as the flags passed to mq_open(). Modify the mq tests to validate _at least_ the expected flags are set, but don't require strict equality on these platforms. Verified these tests pass on DragonFly and NetBSD locally. Co-authored-by: Ryan Zoeller <[email protected]>
Build failed: |
bors retry |
1624: Fix mq tests on NetBSD and DragonFly r=asomers a=rtzoeller NetBSD (and DragonFly, which borrows its implementation) include additional flags beyond O_NONBLOCK in MqAttr, such as the flags passed to mq_open(). Modify the mq tests to validate _at least_ the expected flags are set, but don't require strict equality on these platforms. Verified these tests pass on DragonFly and NetBSD locally. Co-authored-by: Ryan Zoeller <[email protected]>
Build failed: |
@asomers any ideas on this FreeBSD failure? |
AFAICT the failure is due to some sort of race condition between the newly minted |
I can't reproduce the failure locally, possibly because my dev system is too fast. The CI systems are slower, and have slower storage. But I can guess what the problem is: the |
bors retry |
NetBSD (and DragonFly, which borrows its implementation) include additional flags beyond O_NONBLOCK in MqAttr, such as the flags passed to mq_open(). Modify the mq tests to validate at least the expected flags are set, but don't require strict equality on these platforms.
Verified these tests pass on DragonFly and NetBSD locally.