about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2024-01-29 21:23:19 +0000
committerEric Wong <e@80x24.org>2024-01-30 08:28:45 +0000
commit0a989e8abd36599abe13c36c2b30ab75232f9756 (patch)
tree96729179634660501350bf818dbf1bf5a1a70e9d /t
parent8c911b8ea278ad36fcff0cee9a8ae3c061bae3ac (diff)
downloadpublic-inbox-0a989e8abd36599abe13c36c2b30ab75232f9756.tar.gz
While syscall symbols (e.g. SYS_*) have changed on us in FreeBSD
during the history of Sys::Syscall and this project and did bite
us in some cases; the actual numbers don't get recycled for new
syscalls.  We're also fortunate that sendmsg and recvmsg syscalls
and associated msghdr and cmsg structs predate the BSD forks and
are compatible across all the BSDs I've tried.

OpenBSD routes Perl `syscall' through libc; while NetBSD + FreeBSD
document procedures for maintaining backwards compatibility.
It looks like Dragonfly follows FreeBSD, here.

Tested on i386 OpenBSD, and amd64 {Free,Net,Open,Dragonfly}BSD

This enables *BSD users to use lei, -cindex and future SCM_RIGHTS-only
features without needing Inline::C.

[1] https://cvsweb.openbsd.org/src/gnu/usr.bin/perl/gen_syscall_emulator.pl
[2] https://www.netbsd.org/docs/internals/en/chap-processes.html#syscall_versioning
[3] https://wiki.freebsd.org/AddingSyscalls#Backward_compatibily
Diffstat (limited to 't')
-rw-r--r--t/cmd_ipc.t9
1 files changed, 4 insertions, 5 deletions
diff --git a/t/cmd_ipc.t b/t/cmd_ipc.t
index 08a4dcc3..c973c6f0 100644
--- a/t/cmd_ipc.t
+++ b/t/cmd_ipc.t
@@ -143,14 +143,13 @@ SKIP: {
 }
 
 SKIP: {
-        skip 'not Linux', 1 if $^O ne 'linux';
         require_ok 'PublicInbox::Syscall';
         $send = PublicInbox::Syscall->can('send_cmd4') or
-                skip 'send_cmd4 not defined for arch', 1;
+                skip "send_cmd4 not defined for $^O arch", 1;
         $recv = PublicInbox::Syscall->can('recv_cmd4') or
-                skip 'recv_cmd4 not defined for arch', 1;
-        $do_test->(SOCK_STREAM, 0, 'PP Linux stream');
-        $do_test->(SOCK_SEQPACKET, 0, 'PP Linux seqpacket');
+                skip "recv_cmd4 not defined for $^O arch", 1;
+        $do_test->(SOCK_STREAM, 0, 'pure Perl stream');
+        $do_test->(SOCK_SEQPACKET, 0, 'pure Perl seqpacket');
 }
 
 done_testing;