$Is_W32 = $^O eq 'MSWin32';
$Is_NetWare = $^O eq 'NetWare';
$Is_Dos = $^O eq 'dos';
+$Is_MPE = $^O eq 'mpeix';
$testfd = open("TEST", O_RDONLY, 0) and print "ok 1\n";
read($testfd, $buffer, 9) if $testfd > 2;
}
}
-print &_POSIX_OPEN_MAX > $fds[1] ? "ok 12\n" : "not ok 12\n";
+if ($Is_MPE) {
+ print "ok 12 # skipped, _POSIX_OPEN_MAX is inaccurate on MPE\n"
+} else {
+ print &_POSIX_OPEN_MAX > $fds[1] ? "ok 12\n" : "not ok 12\n"
+}
print getcwd() =~ m#/t$# ? "ok 13\n" : "not ok 13\n";
print "1..0 # Skip: Storable was not built\n";
exit 0;
}
+ if ($^O eq 'mpeix') {
+ print "1..0 # Skip: truncate missing on MPE\n";
+ exit 0;
+ }
require 'lib/st-dump.pl';
}
my $have_gettimeofday = defined &Time::HiRes::gettimeofday;
my $have_usleep = defined &Time::HiRes::usleep;
my $have_ualarm = defined &Time::HiRes::ualarm;
+my $have_time = defined &Time::HiRes::time;
import Time::HiRes 'gettimeofday' if $have_gettimeofday;
import Time::HiRes 'usleep' if $have_usleep;
ok 4, ($two[0] > $one[0] || ($two[0] == $one[0] && $two[1] > $one[1])),
"@two is not greater than @one";
- my $f = Time::HiRes::time;
+ my $f = Time::HiRes::time();
ok 5, $f > 850_000_000, "$f too small";
ok 6, $f - $two[0] < 2, "$f - @two >= 2";
}
skip 8;
}
else {
- my $f = Time::HiRes::time;
+ my $f = Time::HiRes::time();
usleep(500_000);
- my $f2 = Time::HiRes::time;
+ my $f2 = Time::HiRes::time();
my $d = $f2 - $f;
ok 8, $d > 0.4 && $d < 0.8, "slept $d secs $f to $f2";
}
ok 10, $f < 2, $f;
}
-if (!$have_usleep) {
+if (!$have_usleep || !$have_gettimeofday) {
skip 11;
}
else {
# new test: did we even get close?
-{
+if (!$have_time) {
+ skip 14
+} else {
my $t = time();
my $tf = Time::HiRes::time();
ok 14, (abs($tf - $t) <= 1),
print "$f\nok 15\n";
print "# sleep...";
- $r = [Time::HiRes::gettimeofday];
+ $r = [Time::HiRes::gettimeofday()];
sleep (0.5);
print Time::HiRes::tv_interval($r), "\nok 16\n";
- $r = [Time::HiRes::gettimeofday];
+ $r = [Time::HiRes::gettimeofday()];
$i = 5;
$SIG{ALRM} = "tick";
while ($i)
use Time::HiRes qw (setitimer getitimer ITIMER_VIRTUAL);
my $i = 3;
- my $r = [Time::HiRes::gettimeofday];
+ my $r = [Time::HiRes::gettimeofday()];
$SIG{VTALRM} = sub {
$i ? $i-- : setitimer(ITIMER_VIRTUAL, 0);
use Config;
$Is_Dosish = ($^O eq 'MSWin32' or $^O eq 'NetWare' or $^O eq 'dos' or
- $^O eq 'os2' or $^O eq 'mint' or $^O eq 'cygwin');
+ $^O eq 'os2' or $^O eq 'mint' or $^O eq 'cygwin' or
+ $^O eq 'mpeix');
if (defined &Win32::IsWinNT && Win32::IsWinNT()) {
$Is_Dosish = '' if Win32::FsType() eq 'NTFS';
$Is_NetWare = $^O eq 'NetWare';
$Is_Dos = $^O eq 'dos';
$Is_Cygwin = $^O eq 'cygwin';
+$Is_MPE = $^O eq 'mpeix';
$Is_Dosish = $Is_Dos || $^O eq 'os2' || $Is_MSWin32 || $Is_NetWare || $Is_Cygwin;
chop($cwd = (($Is_MSWin32 || $Is_NetWare) ? `cd` : `pwd`));
print "# open failed: $!\nnot ok 1\nnot ok 2\n";
}
-if ($Is_Dosish) { unlink "Op.stat.tmp2"}
+if ($Is_Dosish || $Is_MPE) { unlink "Op.stat.tmp2"}
else {
`rm -f Op.stat.tmp2;ln Op.stat.tmp Op.stat.tmp2; chmod 644 Op.stat.tmp`;
}
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat('Op.stat.tmp');
-if ($Is_Dosish || $Config{dont_use_nlink})
+if ($Is_Dosish || $Is_MPE || $Config{dont_use_nlink})
{print "ok 3 # skipped: no link count\n";}
elsif ($nlink == 2)
{print "ok 3\n";}
else {print "# \$nlink is |$nlink|\nnot ok 3\n";}
-if ( $Is_Dosish
+if ( $Is_Dosish || $Is_MPE
# Solaris tmpfs bug
|| ($cwd =~ m#^/tmp# and $mtime && $mtime==$ctime && $^O eq 'solaris')
|| $cwd =~ m#$Config{'afsroot'}/#
{print "not ok 33\n";}
if (! -b '.') {print "ok 34\n";} else {print "not ok 34\n";}
-if ($^O eq 'mpeix' or $^O eq 'amigaos' or $Is_Dosish or $Is_Cygwin) {
+if ($Is_MPE or $^O eq 'amigaos' or $Is_Dosish or $Is_Cygwin) {
print "ok 35 # skipped: no -u\n"; goto tty_test;
}