X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2Fipc_sysv.t;h=d2991e3eace09efc2338596e154a01da6e7ee844;hb=cfe9256d1794c4ece59271252cf3b24a3f76933e;hp=00a157ba541fe14c1e7d09e44c7ab1fee2d70e75;hpb=45c0de28763808112fd2f46ea311b6bb0c6050b3;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/lib/ipc_sysv.t b/t/lib/ipc_sysv.t index 00a157b..d2991e3 100755 --- a/t/lib/ipc_sysv.t +++ b/t/lib/ipc_sysv.t @@ -9,7 +9,9 @@ BEGIN { my $reason; - if ($Config{'d_sem'} ne 'define') { + if ($Config{'extensions'} !~ /\bIPC\/SysV\b/) { + $reason = 'IPC::SysV was not built'; + } elsif ($Config{'d_sem'} ne 'define') { $reason = '$Config{d_sem} undefined'; } elsif ($Config{'d_msg'} ne 'define') { $reason = '$Config{d_msg} undefined'; @@ -23,8 +25,7 @@ BEGIN { # These constants are common to all tests. # Later the sem* tests will import more for themselves. -use IPC::SysV qw(IPC_PRIVATE IPC_NOWAIT IPC_STAT IPC_RMID - S_IRWXU S_IRWXG S_IRWXO S_IWGRP S_IROTH S_IWOTH); +use IPC::SysV qw(IPC_PRIVATE IPC_NOWAIT IPC_STAT IPC_RMID S_IRWXU); use strict; print "1..16\n"; @@ -55,12 +56,7 @@ EOM exit(1); }; -my $perm; - -$perm = S_IRWXU | S_IRWXG | S_IRWXO | S_IWGRP | S_IROTH | S_IWOTH - if $^O eq 'vmesa'; - -$perm = S_IRWXU | S_IRWXG | S_IRWXO unless defined $perm; +my $perm = S_IRWXU; if ($Config{'d_msgget'} eq 'define' && $Config{'d_msgctl'} eq 'define' && @@ -77,8 +73,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 <