unix: Don't fail on FreeBSD running ZFS#461
Merged
chrissie-c merged 2 commits intoClusterLabs:mainfrom Mar 17, 2022
Merged
Conversation
ZFS doesn't support posix_fallocate() so libqb IPC or RB would always fail with EINVAL. As there seems to be no prospect of a more useful return code, trap it in a QB_BSD #ifdef. That way if we do have actual errors in the posix_fallocate() call the Linux tests should still find them. Also, stick a small sleep in the test_ipc_disconnect_after_created test to allow the server to shutdown before killing it with SIGTERM and causing a test failure. all the other uses of it seem to have this sleep!
kgaillot
reviewed
Mar 14, 2022
| } else if (res == EINVAL) { /* posix_fallocate() fails on ZFS | ||
| https://lists.freebsd.org/pipermail/freebsd-current/2018-February/068448.html */ | ||
| qb_util_log(LOG_DEBUG, "posix_fallocate returned EINVAL - running on ZFS?"); | ||
| #endif |
There was a problem hiding this comment.
Another possibility would be to do what's currently in the #else block if posix_fallocate() fails, as a fallback (regardless of platform). Not sure if that's better though ...
|
|
||
| qb_ipcc_disconnect(conn); | ||
| sleep(1); /* Give it time to stop */ | ||
| kill_server(pid); |
There was a problem hiding this comment.
If you want to make sure this doesn't get overlooked, you could make the sleep time an argument to kill_server()
|
looks good |
Contributor
Author
|
Thanks Ken. if you get time, could you also please have a look at #455 - it's been hanging around for a while and keeps getting overlooked, but I think we should be testing this feature as I believe it's till used in container (and if not, we can remove it!) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ZFS doesn't support posix_fallocate() so libqb IPC or RB would
always fail with EINVAL.
As there seems to be no prospect of a more useful return code,
trap it in a QB_BSD #ifdef. That way if we do have actual errors
in the posix_fallocate() call the Linux tests should still find them.
Also, stick a small sleep in the test_ipc_disconnect_after_created
test to allow the server to shutdown before killing it with SIGTERM
and causing a test failure. all the other uses of it seem to have this
sleep!