vmstat -d or vmstat -p would crash mysteriously under different
circumstances. The problem was eventually tracked down to /sys not
being mounted which meant is_disk() always returned false.
The partition would then be attempted to be linked to a non-existent
disk causing a segfault.
vmstat will now not link to a disk if none exists.
The change in testing will skip those tests when /sys/block doesn't
exist.
Many thanks to Daniel Schepler for his analysis and suggestions.
Bug-Debian: http://bugs.debian.org/736628
The pwdx check expected error message, which where in use for only
short period of time. The old message was put in place in commit
9d47cb0c38
The vmstat issue was triggered by 'sr0' cdrom device, which gives
following unexpected output. Fix simply ignores partitions which has
zero activity. Besides such partitions probably would not apply as
good candidate of -p option anyway.
$ vmstat -p sr0
Partition was not found
Reported-By: Moritz Muehlenhoff <jmm@debian.org>
Bug-Debian: http://bugs.debian.org/656508
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The dejagnu tests for slabtop are skipped when "/proc/slabinfo" is
unreadable due to permissions. This commit provides the same check
for vmstat under its -m (slabinfo) option.
Makefile will now only test for Linux systems, a work around in the
makefile due to some silly redefine restrictions.
uptime and w now won't error due to being one user logged in, thanks to
Sami for the patch
kill processes by pid test commented out due to false negatives
pwdx process 1 check also commented out due to false negatives