Skip tests where /proc/vmstat unreadable
testsuite would fail if /proc/vmstat was unreadable. Issue #3 brought up by Mike Frysinger. test script explicitly checks to see if it is readable and sets these tests to unsupported if not.
This commit is contained in:
parent
420cd9c7c2
commit
54fdbb19a2
@ -4,7 +4,12 @@
|
|||||||
|
|
||||||
set vmstat "${topdir}vmstat"
|
set vmstat "${topdir}vmstat"
|
||||||
|
|
||||||
# Run vmstat with no arguments
|
# Tests that need to see /proc/vmstat
|
||||||
|
if { [ file readable "/proc/vmstat" ] == 0 } {
|
||||||
|
unsupported "vmstat with no arguments - /proc/vmstat is unreadable"
|
||||||
|
unsupported "vmstat with -a flag - /proc/vmstat is unreadable"
|
||||||
|
unsupported "vmstat fork option - /proc/vmstat is unreadable"
|
||||||
|
} else {
|
||||||
set test "vmstat with no arguments"
|
set test "vmstat with no arguments"
|
||||||
spawn $vmstat
|
spawn $vmstat
|
||||||
expect_pass "$test" "^procs\[ -\]+memory\[ -\]+swap\[ -\]+io\[ -\]+system\[ -\]+cpu\[ -\]+\\s*r\\s+b\\s+swpd\\s+free\\s+buff\\s+cache\\s+si\\s+so\\s+bi\\s+bo\\s+in\\s+cs us sy id wa st\\s*\(\\s+\\d+\){17}\\s*$"
|
expect_pass "$test" "^procs\[ -\]+memory\[ -\]+swap\[ -\]+io\[ -\]+system\[ -\]+cpu\[ -\]+\\s*r\\s+b\\s+swpd\\s+free\\s+buff\\s+cache\\s+si\\s+so\\s+bi\\s+bo\\s+in\\s+cs us sy id wa st\\s*\(\\s+\\d+\){17}\\s*$"
|
||||||
@ -16,6 +21,7 @@ expect_pass "$test" "^procs\[ -\]+memory\[ -\]+swap\[ -\]+io\[ -\]+system\[ -\]+
|
|||||||
set test "vmstat fork option"
|
set test "vmstat fork option"
|
||||||
spawn $vmstat -f
|
spawn $vmstat -f
|
||||||
expect_pass "$test" "^\\s+\\d+ forks\\s*$"
|
expect_pass "$test" "^\\s+\\d+ forks\\s*$"
|
||||||
|
}
|
||||||
|
|
||||||
if { [ file readable "/proc/slabinfo" ] == 0 } {
|
if { [ file readable "/proc/slabinfo" ] == 0 } {
|
||||||
unsupported "slabinfo (-m option) test disabled as /proc/slabinfo is unreadable"
|
unsupported "slabinfo (-m option) test disabled as /proc/slabinfo is unreadable"
|
||||||
|
Loading…
Reference in New Issue
Block a user