diff options
Diffstat (limited to 'regress/sys/kern/sosplice/error/args-unix-EPROTONOSUPPORT.pl')
-rw-r--r-- | regress/sys/kern/sosplice/error/args-unix-EPROTONOSUPPORT.pl | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/regress/sys/kern/sosplice/error/args-unix-EPROTONOSUPPORT.pl b/regress/sys/kern/sosplice/error/args-unix-EPROTONOSUPPORT.pl new file mode 100644 index 00000000000..e664ec8d11f --- /dev/null +++ b/regress/sys/kern/sosplice/error/args-unix-EPROTONOSUPPORT.pl @@ -0,0 +1,23 @@ +# test EPROTONOSUPPORT for splicing unix sockets + +use strict; +use warnings; +use IO::Socket; +use BSD::Socket::Splice "SO_SPLICE"; +use IO::Socket::UNIX; + +our %args = ( + errno => 'EPROTONOSUPPORT', + func => sub { + my $s = IO::Socket::UNIX->new( + Type => SOCK_STREAM, + ) or die "socket failed: $!"; + + my $ss = IO::Socket::UNIX->new( + Type => SOCK_STREAM, + ) or die "socket splice failed: $!"; + + $s->setsockopt(SOL_SOCKET, SO_SPLICE, pack('i', $ss->fileno())) + and die "splice udp sockets succeeded"; + }, +); |