test: Set version-dependent skips based on header defines#5188
Open
tgross35 wants to merge 2 commits into
Open
test: Set version-dependent skips based on header defines#5188tgross35 wants to merge 2 commits into
tgross35 wants to merge 2 commits into
Conversation
76aae41 to
0636284
Compare
8af7d0a to
69fa8db
Compare
When there are additions or updates that are only available with newer platform versions, we don't have a great way to handle testing. The only thing we can really do is unconditionally skip anything that doesn't pass on the oldest versions we have on CI. Improve this by adding a preprocess-only compiler invocation that collects versions from the headers we are building against. These are then used to skip This initial patch only uses the versions for skips on Linux and replacing the NetBSD `uname` invocation.
PowerPC, Sparc, and MIPS (32- and 64-bit for all) have different `_IOC`
numbers, meaning the constants were inaccurate. Example error on
PowerPC64:
bad `EPIOCSPARAMS` value at byte 4: rust: 64 (0x40) != c 128 (0x80)
rust bytes: 00 00 00 00 40 08 8a 01
c bytes: 00 00 00 00 80 08 8a 01
bad `EPIOCGPARAMS` value at byte 4: rust: 128 (0x80) != c 64 (0x40)
rust bytes: 00 00 00 00 80 08 8a 02
c bytes: 00 00 00 00 40 08 8a 02
Resolve this by using `_IOW` and `_IOR`.
Source: https://github.com/torvalds/linux/blob/502d801f0ab03e4f32f9a33d203154ce84887921/include/uapi/linux/eventpoll.h#L97-L99
Fixes: fb58c01 ("epoll: add busy polling parameters")
Contributor
Author
|
I think this is pretty reasonable, and probably the easiest way to make sure anyone on a different kernel version than CI doesn't get a handful of errors, but could use a second set of eyes. |
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.
When there are additions or updates that are only available with newer
platform versions, we don't have a great way to handle testing. The only
thing we can really do is unconditionally skip anything that doesn't
pass on the oldest versions we have on CI.
Improve this by adding a preprocess-only compiler invocation that
collects versions from the headers we are building against. These are
then used to skip
This initial patch only uses the versions for skips on Linux and
replacing the NetBSD
unameinvocation.Also included is an IO number fix that showed up in the new tests.