X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/ae1e0c5fff46df91cf0cda8c05a94a3c971011c3..e4038a1fb4fdfabe2578d9a8ffe81a18bec6013d:/t/lib/ipc_sysv.t diff --git a/t/lib/ipc_sysv.t b/t/lib/ipc_sysv.t index 42b8458..8485d5d 100755 --- a/t/lib/ipc_sysv.t +++ b/t/lib/ipc_sysv.t @@ -7,10 +7,16 @@ BEGIN { require Config; import Config; - unless ($Config{'d_msg'} eq 'define' && - $Config{'d_sem'} eq 'define') { - print "1..0\n"; - exit; + my $reason; + + if ($Config{'d_sem'} ne 'define') { + $reason = '$Config{d_sem} undefined'; + } elsif ($Config{'d_msg'} ne 'define') { + $reason = '$Config{d_msg} undefined'; + } + if ($reason) { + print "1..0 # Skip: $reason\n"; + exit 0; } } @@ -71,8 +77,34 @@ if ($Config{'d_msgget'} eq 'define' && my $msgtype = 1; my $msgtext = "hello"; - msgsnd($msg,pack("L a*",$msgtype,$msgtext),0) or print "not "; + my $test2bad; + my $test5bad; + my $test6bad; + + unless (msgsnd($msg,pack("L! a*",$msgtype,$msgtext),IPC_NOWAIT)) { + print "not "; + $test2bad = 1; + } print "ok 2\n"; + if ($test2bad) { + print <