8 use Linux::SysInfo qw/sysinfo LS_HAS_EXTENDED/;
10 unless (LS_HAS_EXTENDED) {
11 plan skip_all => 'your kernel does not support extended sysinfo fields';
16 for my $run (0 .. 4) {
18 skip 'system error (sysinfo returned undef)' => (5 - $run) * 5
20 is ref($si), 'HASH', "sysinfo returns a hash reference at run $run";
21 is scalar(keys %$si), 14, "sysinfo object has the right number of keys at run $run";
23 for (qw/totalhigh freehigh mem_unit/) {
24 if (defined $si->{$_}) {
25 like $si->{$_}, qr/^\d+(?:\.\d+)?$/,
26 "key $_ looks like a number at run $run";
28 fail "key $_ isn't defined at run $run";