6 use Config qw/%Config/;
9 if (!$Config{useithreads}) {
12 plan(skip_all => 'This perl wasn\'t built to support threads');
18 use Test::More tests => 4 * 10;
20 use Linux::SysInfo qw/sysinfo/;
23 my $tid = threads->tid();
26 skip 'system error (sysinfo returned undef)' => 4 unless defined $si;
27 is ref($si), 'HASH', "sysinfo returns a hash reference in thread $tid";
30 if (defined $si->{uptime}) {
31 like $si->{uptime}, qr/^\d+(?:\.\d+)?$/,
32 "key $_ looks like a number in thread $tid";
34 fail "key $_ isn't defined in thread $tid";
40 my @t = map { threads->create(\&try, $_) } 1 .. 10;