Fixes for QNX SDP 8#158697
Conversation
Linux [1], FreeBSD [2] and the Open Group [3] manuals for both setsid and setpgrp state that the calling process will be assigned a process group ID that matches its process ID so check that's the case in the test by calling getpgid on the child process ID. on QNX8 (as of GA8.0.2) libc::kill(pgid) appears unable to terminate the child process so skip that check on that target as it's behavior that libstd provides no API for [1]: https://man7.org/linux/man-pages/man2/setsid.2.html [2]: https://man.freebsd.org/cgi/man.cgi?query=setsid&sektion=2 [3]: https://pubs.opengroup.org/onlinepubs/000095399/functions/setsid.html
also extend the existing tests to exercise the getsockname(2) and getpeername(2) paths with both named and unnamed Unix sockets
|
Some changes occurred in src/tools/compiletest cc @jieyouxu |
|
r? @aapoalas rustbot has assigned @aapoalas. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
Additional fixes library/std after earlier PR renamed some targets
Standardise on QNX SDP, because that's the thing you install and build against. QNX Neutrino and QNX OS are run-time details that are chosen for you by the SDP you have installed.
Tests ignored on target_os = "nto" should also be ignored on target_os = "qnx".
cc-rs now knows about QNX so the environment isn't required
a1eb41c to
826c18d
Compare
|
Some changes occurred in src/doc/rustc/src/platform-support cc @Noratrieb |
Removed. |
| assert_eq!(pid, pgid, "child process ID does not match its process group ID"); | ||
|
|
||
| if cfg!(target_os = "qnx") { | ||
| // kill(-pgid) appears to be unable to terminate the child process on QNX8 |
There was a problem hiding this comment.
question: This seems like a fairly big discrepancy - does this cause issues with user-facing process APIs as well?
| #[cfg(not(target_os = "nto"))] | ||
| #[cfg(not(any(target_os = "nto", target_os = "qnx")))] | ||
| const KEY_SENTVAL: usize = 0; | ||
| // On QNX Neutrino, 0 is always returned when currently not in use. |
There was a problem hiding this comment.
nitpick:
| // On QNX Neutrino, 0 is always returned when currently not in use. | |
| // On QNX, 0 is always returned when currently not in use. |
There was a problem hiding this comment.
Fixed (and a few others too)
| //@ needs-subprocess | ||
| //@ ignore-fuchsia no exception handler registered for segfault | ||
| //@ ignore-nto Crash analysis impossible at SIGSEGV in QNX Neutrino | ||
| //@ ignore-qnx Crash analysis impossible at SIGSEGV in QNX Neutrino |
There was a problem hiding this comment.
nitpick: These to presumably shouldn't talk about QNX Neutrino?
This PR contains libstd fixes so libstd can be build for QNX SDP 8.
It requires patches to libc-0.2 and cc-rs. The cc-rs patch was merged already. I have a patch for libc-1.0 here which will need backporting to libc-0.2 once merged.
With these in place, I was able to remotely
test tests/ui library/std library/alloc library/coreforx86_64-pc-qnxusing a remote-test-server running on QNX SDP 8.0's QEMU BSP image. The only tests that failed were the twotests/ui/codegen/huge-stacks.rstests, and I did not have enough RAM to run them.