-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add FreeBSD10 build job #1491
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
Closed
Closed
Add FreeBSD10 build job #1491
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
946a868
Add FreeBSD10 build job
gnzlbg 97508f8
Use FreeBSD11 module for FreeBSD10
gnzlbg 33b602c
Remove sendmm/recvmm from freebsd10
gnzlbg e21b641
Support FreeBSD10 in libc-test
gnzlbg 8512e07
Only test FreeBSD10 using LIBC_CI
gnzlbg 1848e58
Cfg out constants that are not available in FreeBSD10
gnzlbg 411f04d
Docs and formatting
gnzlbg efaabd8
WIP: use freebsd11 linknames for freebsd10
gnzlbg 7ce068e
Skip items not available in FreeBSD10 in the libc-tests
gnzlbg eb28423
Fix documentation of skipping aio_waitcomplete in FreeBSD10 tests
gnzlbg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1457,6 +1457,7 @@ fn test_freebsd(target: &str) { | |
let freebsd_ver = which_freebsd(); | ||
|
||
match freebsd_ver { | ||
Some(10) => cfg.cfg("freebsd10", None), | ||
Some(11) => cfg.cfg("freebsd11", None), | ||
Some(12) => cfg.cfg("freebsd12", None), | ||
Some(13) => cfg.cfg("freebsd13", None), | ||
|
@@ -1466,7 +1467,10 @@ fn test_freebsd(target: &str) { | |
// Required for `getline`: | ||
cfg.define("_WITH_GETLINE", None); | ||
// Required for making freebsd11_stat available in the headers | ||
cfg.define("_WANT_FREEBSD11_STAT", None); | ||
match freebsd_ver { | ||
Some(10) => &mut cfg, | ||
_ => cfg.define("_WANT_FREEBSD11_STAT", None), | ||
}; | ||
|
||
headers! { cfg: | ||
"aio.h", | ||
|
@@ -1594,6 +1598,34 @@ fn test_freebsd(target: &str) { | |
true | ||
} | ||
|
||
// These constants were introduced in FreeBSD 11: | ||
"SF_USER_READAHEAD" | ||
| "SF_NOCACHE" | ||
| "RLIMIT_KQUEUES" | ||
| "RLIMIT_UMTXP" | ||
| "EVFILT_PROCDESC" | ||
| "EVFILT_SENDFILE" | ||
| "EVFILT_EMPTY" | ||
| "SO_REUSEPORT_LB" | ||
| "TCP_CCALGOOPT" | ||
| "TCP_PCAP_OUT" | ||
| "TCP_PCAP_IN" | ||
| "IP_BINDMULTI" | ||
| "IP_ORIGDSTADDR" | ||
| "IP_RECVORIGDSTADDR" | ||
| "IPV6_ORIGDSTADDR" | ||
| "IPV6_RECVORIGDSTADDR" | ||
| "PD_CLOEXEC" | ||
| "PD_ALLOWED_AT_FORK" | ||
| "IP_RSS_LISTEN_BUCKET" | ||
if Some(10) == freebsd_ver => | ||
{ | ||
true | ||
} | ||
|
||
// FIXME: This constant has a different value in FreeBSD 10: | ||
"RLIM_NLIMITS" if Some(10) == freebsd_ver => true, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This constant shouldn't even be defined by libc. I'm going to open a new PR to deprecate it. |
||
|
||
// FIXME: There are deprecated - remove in a couple of releases. | ||
// These constants were removed in FreeBSD 11 (svn r273250) but will | ||
// still be accepted and ignored at runtime. | ||
|
@@ -1609,12 +1641,28 @@ fn test_freebsd(target: &str) { | |
} | ||
}); | ||
|
||
cfg.skip_struct(move |ty| { | ||
match ty { | ||
// `mmsghdr` is not available in FreeBSD 10 | ||
"mmsghdr" if Some(10) == freebsd_ver => true, | ||
|
||
_ => false, | ||
} | ||
}); | ||
|
||
cfg.skip_fn(move |name| { | ||
// skip those that are manually verified | ||
match name { | ||
// FIXME: https://github.com/rust-lang/libc/issues/1272 | ||
"execv" | "execve" | "execvp" | "execvpe" | "fexecve" => true, | ||
|
||
// These functions were added in FreeBSD 11: | ||
"fdatasync" | "mq_getfd_np" if Some(10) == freebsd_ver => true, | ||
|
||
// This function changed its return type from `int` in FreeBSD10 to | ||
// `ssize_t` in FreeBSD11: | ||
"aio_waitcomplete" if Some(10) == freebsd_ver => true, | ||
|
||
// The `uname` function in the `utsname.h` FreeBSD header is a C | ||
// inline function (has no symbol) that calls the `__xuname` symbol. | ||
// Therefore the function pointer comparison does not make sense for it. | ||
|
@@ -1630,6 +1678,14 @@ fn test_freebsd(target: &str) { | |
} | ||
}); | ||
|
||
cfg.skip_signededness(move |c| { | ||
match c { | ||
// FIXME: has a different sign in FreeBSD10 | ||
"blksize_t" if Some(10) == freebsd_ver => true, | ||
_ => false, | ||
} | ||
}); | ||
|
||
cfg.volatile_item(|i| { | ||
use ctest::VolatileItemKind::*; | ||
match i { | ||
|
@@ -1643,9 +1699,17 @@ fn test_freebsd(target: &str) { | |
}); | ||
|
||
cfg.skip_field(move |struct_, field| { | ||
// FIXME: `sa_sigaction` has type `sighandler_t` but that type is | ||
// incorrect, see: https://github.com/rust-lang/libc/issues/1359 | ||
(struct_ == "sigaction" && field == "sa_sigaction") | ||
match (struct_, field) { | ||
// FIXME: `sa_sigaction` has type `sighandler_t` but that type is | ||
// incorrect, see: https://github.com/rust-lang/libc/issues/1359 | ||
("sigaction", "sa_sigaction") => true, | ||
|
||
// FIXME: in FreeBSD10 this field has type `char*` instead of | ||
// `void*`: | ||
("stack_t", "ss_sp") if Some(10) == freebsd_ver => true, | ||
|
||
_ => false, | ||
} | ||
}); | ||
|
||
cfg.skip_roundtrip(move |s| match s { | ||
|
@@ -2473,6 +2537,7 @@ fn which_freebsd() -> Option<i32> { | |
let stdout = String::from_utf8(output.stdout).ok()?; | ||
|
||
match &stdout { | ||
s if s.starts_with("10") => Some(10), | ||
s if s.starts_with("11") => Some(11), | ||
s if s.starts_with("12") => Some(12), | ||
s if s.starts_with("13") => Some(13), | ||
|
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
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
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
Oops, something went wrong.
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.
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.
You shouldn't need this symbol . This is only needed on 12+ to expose the backwards-compatible definition of
struct stat
under a different name, and libc doesn't appear to be doing anything with it.