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

tests: Do not expect signals to be messages #2707

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

gdt
Copy link
Contributor

@gdt gdt commented Dec 3, 2024

POSIX does not require 1:1 delivery per kill() call. Adjust the test to not require behavior that 1) POSIX does not require and 2) is only probabilistically observed to happen, even if "most of the time".

The test previously sent signals as rapidly as possible, observed to be on the order of 100 us via ktrace. Sometimes, a signal sent twice was delivered once. This is legal, and it is an error to rely on this.

This commit adds comments discussing signal semantics. It adds a delay between some signals, to allow time for delivery. We consider a system which does not deliver signals within 1 s to be deficient.

POSIX does not require 1:1 delivery per kill() call.  Adjust the test
to not require behavior that 1) POSIX does not require and 2) is only
probabalistically observed to happen, even if "most of the time".

Signed-off-by: Greg Troxel <[email protected]>
@jimklimov jimklimov added C++ CI Entries related to continuous integration infrastructure (historically also recipes like Makefiles) portability We want NUT to build and run everywhere possible labels Dec 3, 2024
@jimklimov jimklimov added this to the 2.8.3 milestone Dec 3, 2024
Copy link
Member

@jimklimov jimklimov left a comment

Choose a reason for hiding this comment

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

Thanks for the investigation and PRs!

@jimklimov jimklimov added the bug label Dec 3, 2024
@jimklimov jimklimov merged commit 2d64030 into networkupstools:master Dec 4, 2024
30 checks passed
@gdt gdt deleted the fix/signal-not-message branch December 4, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug C++ CI Entries related to continuous integration infrastructure (historically also recipes like Makefiles) portability We want NUT to build and run everywhere possible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants