#!./perl
BEGIN {
chdir 't' if -d 't';
my $reason;
}
exit 0;
}
}
# These constants are common to all tests.
# Later the sem* tests will import more for themselves.
use strict;
print "1..16\n";
my $msg;
my $sem;
# FreeBSD is known to throw this if there's no SysV IPC in the kernel.
print STDERR <<EOM;
SIGSYS caught.
It may be that your kernel does not have SysV IPC configured.
EOM
print STDERR <<EOM;
You must have following options in your kernel:
options SYSVSHM
options SYSVSEM
options SYSVMSG
See config(8).
EOM
}
exit(1);
};
# Very first time called after machine is booted value may be 0
print "ok 1\n";
#Putting a message on the queue
my $msgtype = 1;
my $test2bad;
my $test5bad;
my $test6bad;
print "not ";
$test2bad = 1;
}
print "ok 2\n";
print <<EOM;
#
# The failure of the subtest #2 may indicate that the message queue
# resource limits either of the system or of the testing account
# have been reached. Error message "Operating would block" is
# usually indicative of this situation. The error message was now:
# "$!"
#
# You can check the message queues with the 'ipcs' command and
# you can remove unneeded queues with the 'ipcrm -q id' command.
# You may also consider configuring your system or account
# to have more message queue resources.
#
# Because of the subtest #2 failing also the substests #5 and #6 will
# very probably also fail.
#
EOM
}
my $data;
print "ok 3\n";
print "ok 4\n";
my $msgbuf;
print "not ";
$test5bad = 1;
}
print "ok 5\n";
print <<EOM;
#
# This failure was to be expected because the subtest #2 failed.
#
EOM
}
print "not ";
$test6bad = 1;
}
print "ok 6\n";
print <<EOM;
#
# This failure was to be expected because the subtest #2 failed.
#
EOM
}
} else {
for (1..6) {
print "ok $_\n"; # fake it
}
}
# Very first time called after machine is booted value may be 0
print "ok 7\n";
my $data;
print "ok 8\n";
print "ok 9\n";
my $nsem = 10;
print "ok 10\n";
print "ok 11\n";
print "ok 12\n";
print "ok 13\n";
my $poke = 2;
print "ok 14\n";
print "ok 15\n";
print "ok 16\n";
} else {
for (7..16) {
print "ok $_ # skipped, no semctl possible\n";
}
}
} else {
for (7..16) {
print "ok $_\n"; # fake it
}
}
}