Commits on Source (14)
-
On some systems (e.g. FreeBSD with the latest epoll-shim), fcntl is declared as a macro instead of a function. Wrap the definition here in parantheses to avoid function-macro expansion. Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
8ec25be6 -
FreeBSD does not provide epoll(7) and instead requires an external library, epoll-shim, that implements epoll() using kqueue(2) Co-authored-by: Jan Beich <jbeich@FreeBSD.org> Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
c65f852f -
This is in preparation for adding FreeBSD CI support. Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
c260d577 -
The file key can have multiple values, so we don't need another "project". Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
3288a076 -
Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
c0e8990e -
Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
f1552700 -
On FreeBSD we have to use getsockopt(fd, SOL_LOCAL, LOCAL_PEERCRED) instead. This change is based on a downstream patch in FreeBSD ports. Co-authored-by: Greg V <greg@unrelenting.technology> Co-authored-by: Koop Mast <kwm@rainbow-runner.nl> Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
54b237a6 -
Some operating systems (e.g. FreeBSD) do not implement mremap. In that case we can grow the mapping by trying to map adjacent memory. If that fails we can fall back to creating a new larger mapping and moving the old memory contents there. Co-authored-by: Koop Mast <kwm@rainbow-runner.nl> Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
5a981ee8 -
/dev/fd exists on all operating systems I can test (Linux, FreeBSD, macOS), whereas /proc/self/fd only appears to exist on Linux. Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
644efe95 -
FreeBSD provides a PROC_TRACE_STATUS procctl(2) to detect this directly. Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
bb928288 -
This allows running the tests on FreeBSD without mounting fdescfs. Previously you had to run `mount -t fdescfs -o linrdlnk null /dev/fd` to get file descriptors >=3 listed in /dev/fd. Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
42bf011f -
If we are compiling against a version of FreeBSD where MSG_CMSG_CLOEXEC does not work, use the fallback directly. This was only fixed recently (in https://cgit.freebsd.org/src/commit/?id=6ceacebdf52211 ). Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
382f368a -
On Linux the signal will be immediately visible in the epoll_wait() call. However, on FreeBSD we may need a small delay between kill() call and the signal being visible to the kevent() call. This sometimes happens when the signal processing and kevent processing runs on different CPUs in the kernel, so becomes more likely when the system is under load (e.g. running all tests in parallel). See https://github.com/jiixyj/epoll-shim/pull/32 Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
ed423b8a -
This uses the new FreeBSD supported added in freedesktop/ci-templates!114 After the latest series of commits, we should be able to compile and successfully run all tests, so adding this CI job will prevent any future FreeBSD regressions. Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
4d473310