From f4cc9720eebee591fbcbd2ada89c9ada234e9cd8 Mon Sep 17 00:00:00 2001 From: Craig Small Date: Tue, 27 May 2014 20:49:16 +1000 Subject: [PATCH] Reduced partition type check vmstat -p checks used to fail on systems with odd partition tables, including some Debian buildd servers. This change limits what sort of test partitions are used, otherwise the test is skipped. There probably are other valid partitions, these can be added later, if known. --- testsuite/vmstat.test/vmstat.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/vmstat.test/vmstat.exp b/testsuite/vmstat.test/vmstat.exp index f470afc3..35ffddb8 100644 --- a/testsuite/vmstat.test/vmstat.exp +++ b/testsuite/vmstat.test/vmstat.exp @@ -38,7 +38,7 @@ set diskstats [ exec cat /proc/diskstats ] if { [ file readable "/sys/block" ] == 0 } { unsupported "vmstat partition /sys/block not readable" } else { - if [ regexp "\\s+\\d+\\s+\\d+\\s+\(\[a-z\]+\\d+\)\\s+\[0-9\]\[0-9\]+" $diskstats line partition == 1 ] { + if [ regexp "\\s+\\d+\\s+\\d+\\s+\((?:hd|sd|vd)\[a-z\]\\d+\)\\s+\[0-9\]\[0-9\]+" $diskstats line partition == 1 ] { set test "vmstat partition (using $partition)" spawn $vmstat -p $partition expect_pass "$test" "^${partition}\\s+reads" -- 2.40.0