]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
block/017: also check /sys/block/$dev/stat
authorOmar Sandoval <osandov@fb.com>
Thu, 26 Apr 2018 22:06:08 +0000 (15:06 -0700)
committerOmar Sandoval <osandov@fb.com>
Thu, 26 Apr 2018 22:06:08 +0000 (15:06 -0700)
This should have the same value as /proc/diskstats.

Signed-off-by: Omar Sandoval <osandov@fb.com>
tests/block/017
tests/block/017.out

index 90f187b06b08f23923c8bba3dd0460401b18742b..2851894833cc50200f16d4b191124189945d4786 100755 (executable)
@@ -1,7 +1,8 @@
 #!/bin/bash
 #
-# Test the inflight counter in /sys/block/$dev/inflight and /proc/diskstats.
-# Regression test for patch "blk-mq: fix sysfs inflight counter".
+# Test the inflight counter in /sys/block/$dev/inflight, /sys/block/$dev/stat,
+# and /proc/diskstats. Regression test for patch "blk-mq: fix sysfs inflight
+# counter".
 #
 # Copyright (C) 2018 Omar Sandoval
 #
@@ -26,7 +27,9 @@ requires() {
 }
 
 show_inflight() {
-       awk '{ printf "sysfs reads %d\nsysfs writes %d\n", $1, $2 }' /sys/block/nullb0/inflight
+       awk '{ printf "sysfs inflight reads %d\nsysfs inflight writes %d\n", $1, $2 }' \
+               /sys/block/nullb0/inflight
+       awk '{ print "sysfs stat " $9 }' /sys/block/nullb0/stat
        awk '$3 == "nullb0" { print "diskstats " $12 }' /proc/diskstats
 }
 
index c6038bb37fc9a9a2046aa4724da43639bd87b3dd..93d67c98e15931011d66381d58d7a5cac6c4403c 100644 (file)
@@ -1,22 +1,28 @@
 Running block/017
 queue mode 1
-sysfs reads 1
-sysfs writes 0
+sysfs inflight reads 1
+sysfs inflight writes 0
+sysfs stat 1
 diskstats 1
-sysfs reads 1
-sysfs writes 1
+sysfs inflight reads 1
+sysfs inflight writes 1
+sysfs stat 2
 diskstats 2
-sysfs reads 0
-sysfs writes 0
+sysfs inflight reads 0
+sysfs inflight writes 0
+sysfs stat 0
 diskstats 0
 queue mode 2
-sysfs reads 1
-sysfs writes 0
+sysfs inflight reads 1
+sysfs inflight writes 0
+sysfs stat 1
 diskstats 1
-sysfs reads 1
-sysfs writes 1
+sysfs inflight reads 1
+sysfs inflight writes 1
+sysfs stat 2
 diskstats 2
-sysfs reads 0
-sysfs writes 0
+sysfs inflight reads 0
+sysfs inflight writes 0
+sysfs stat 0
 diskstats 0
 Test complete