From: Michael G. Schwern Date: Fri, 29 Mar 2002 05:46:23 +0000 (-0500) Subject: Quieting OS X X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=be4e88b6b2af8677110eaacd60e6621c85ec165c;p=p5sagit%2Fp5-mst-13.2.git Quieting OS X Message-ID: <20020329104622.GA9163@blackrider> p4raw-id: //depot/perl@15594 --- diff --git a/ext/POSIX/t/posix.t b/ext/POSIX/t/posix.t index 762c3f1..86bc58f 100644 --- a/ext/POSIX/t/posix.t +++ b/ext/POSIX/t/posix.t @@ -58,17 +58,24 @@ SKIP: { $sigset->delset(1); ok(! $sigset->ismember(1), 'POSIX::SigSet->delset' ); ok( $sigset->ismember(3), 'POSIX::SigSet->ismember' ); - + SKIP: { skip("no kill() support on Mac OS", 4) if $Is_MacOS; - print "# warning, darwin seems to loose blocked signals (failing test 10)\n" if($^O eq 'darwin'); + my $sigint_called = 0; + my $mask = new POSIX::SigSet &SIGINT; my $action = new POSIX::SigAction 'main::SigHUP', $mask, 0; sigaction(&SIGHUP, $action); $SIG{'INT'} = 'SigINT'; kill 'HUP', $$; sleep 1; + + printf "%s 10 - masked SIGNINT received %s\n", + $sigint_called ? "ok" : "not ok", + $^O eq 'darwin' ? "# TODO Darwin seems to loose blocked signals" + : ''; + print "ok 11 - signal masks successful\n"; sub SigHUP { @@ -79,7 +86,7 @@ SKIP: { } sub SigINT { - print "ok 10 - masked SIGINT received\n"; + $sigint_called++; } # The order of the above tests is very important, so diff --git a/t/op/stat.t b/t/op/stat.t index 9306d2f..5b01821 100755 --- a/t/op/stat.t +++ b/t/op/stat.t @@ -15,6 +15,7 @@ my $Perl = which_perl(); $Is_Amiga = $^O eq 'amigaos'; $Is_Cygwin = $^O eq 'cygwin'; +$Is_Darwin = $^O eq 'darwin'; $Is_Dos = $^O eq 'dos'; $Is_MPE = $^O eq 'mpeix'; $Is_MSWin32 = $^O eq 'MSWin32'; @@ -26,6 +27,8 @@ $Is_DGUX = $^O eq 'dgux'; $Is_Dosish = $Is_Dos || $Is_OS2 || $Is_MSWin32 || $Is_NetWare || $Is_Cygwin; +$Is_UFS = $Is_Darwin && (() = `df -t ufs .`) == 2; + my($DEV, $INO, $MODE, $NLINK, $UID, $GID, $RDEV, $SIZE, $ATIME, $MTIME, $CTIME, $BLKSIZE, $BLOCKS) = (0..12); @@ -100,10 +103,12 @@ SKIP: { # no ctime concept $ctime is ALWAYS == $mtime # expect netware to be the same ... skip "No ctime concept on this OS", 2 - if $Is_MSWin32; + if $Is_MSWin32 || + ($Is_Darwin && $Is_UFS); + if( !ok($mtime, 'hard link mtime') || !isnt($mtime, $ctime, 'hard link ctime != mtime') ) { - print <