From: Sebastien GODARD Date: Sun, 29 Dec 2019 08:39:53 +0000 (+0100) Subject: iostat: Add new ng tests for flush I/Os X-Git-Tag: v12.3.2~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d3df368f7b5d6505afd6f27a86ee85718c8aa1cb;p=sysstat iostat: Add new ng tests for flush I/Os Test part of iostat code which reads flush I/O operations using /sys/block/xxx/stat file (instead of /proc/diskstats file). Signed-off-by: Sebastien GODARD --- diff --git a/tests/02180 b/tests/02180 new file mode 100644 index 0000000..5496bb2 --- /dev/null +++ b/tests/02180 @@ -0,0 +1,3 @@ +rm -f tests/root +ln -s root3 tests/root +LC_ALL=C TZ=GMT ./iostat -x ALL 1 3 > tests/out.iostat-x-ALL-flush.tmp diff --git a/tests/02185 b/tests/02185 new file mode 100644 index 0000000..096accd --- /dev/null +++ b/tests/02185 @@ -0,0 +1 @@ +diff -u tests/out.iostat-x-ALL-flush.tmp tests/expected.iostat-x-ALL-flush diff --git a/tests/TLIST b/tests/TLIST index cf91529..e7b4935 100644 --- a/tests/TLIST +++ b/tests/TLIST @@ -326,6 +326,8 @@ NOTES: 02165 diff -u tests/out.iostat-x-0.tmp tests/expected.iostat-x-0 02170 LC_ALL=C TZ=GMT ./iostat -dx -p sdb,sdc > tests/out.iostat-x-list.tmp 02175 diff -u tests/out.iostat-x-list.tmp tests/expected.iostat-x-list +02180 LC_ALL=C TZ=GMT ./iostat -x ALL 1 3 > tests/out.iostat-x-ALL-flush.tmp +02185 diff -u tests/out.iostat-x-ALL-flush.tmp tests/expected.iostat-x-ALL-flush ===== iostat tests (narrow/basic output) 02210 LC_ALL=C TZ=GMT ./iostat -s 1 2 > tests/out.iostat-s.tmp diff --git a/tests/expected.iostat b/tests/expected.iostat index 577a581..a91df30 100644 --- a/tests/expected.iostat +++ b/tests/expected.iostat @@ -22,5 +22,6 @@ avg-cpu: %user %nice %system %iowait %steal %idle Device tps kB_read/s kB_wrtn/s kB_dscd/s kB_read kB_wrtn kB_dscd sda 6.40 1.60 1.60 0.00 50 50 0 sdb 0.67 22.60 0.00 0.00 706 0 0 +sdd 1.63 67.48 0.00 0.00 2108 0 0 diff --git a/tests/expected.iostat-ALL b/tests/expected.iostat-ALL index 6b929d4..142badb 100644 --- a/tests/expected.iostat-ALL +++ b/tests/expected.iostat-ALL @@ -32,7 +32,7 @@ Device tps kB_read/s kB_wrtn/s kB_dscd/s kB_read kB_w sda 6.40 1.60 1.60 0.00 50 50 0 sdb 0.67 22.60 0.00 0.00 706 0 0 sdc 0.00 0.00 0.00 0.00 0 0 0 -sdd 0.00 0.00 0.00 0.00 0 0 0 +sdd 1.63 67.48 0.00 0.00 2108 0 0 sde 0.00 0.00 0.00 0.00 0 0 0 scd0 0.00 0.00 0.00 0.00 0 0 0 diff --git a/tests/expected.iostat-ev b/tests/expected.iostat-ev index 3c29b56..7830a2c 100644 --- a/tests/expected.iostat-ev +++ b/tests/expected.iostat-ev @@ -13,5 +13,6 @@ sdb 0.00 0.00 0.00 0.00 0 Device tps Blk_read/s Blk_wrtn/s Blk_dscd/s Blk_read Blk_wrtn Blk_dscd sda 6.40 3.20 3.20 0.00 100 100 0 sdb 0.67 45.20 0.00 0.00 1412 0 0 +sdd 1.63 134.96 0.00 0.00 4216 0 0 diff --git a/tests/expected.iostat-sigint b/tests/expected.iostat-sigint index e9a2e09..37601fb 100644 --- a/tests/expected.iostat-sigint +++ b/tests/expected.iostat-sigint @@ -22,6 +22,7 @@ avg-cpu: %user %nice %system %iowait %steal %idle Device tps kB_read/s kB_wrtn/s kB_dscd/s kB_read kB_wrtn kB_dscd sda 6.40 1.60 1.60 0.00 50 50 0 sdb 0.67 22.60 0.00 0.00 706 0 0 +sdd 1.63 67.48 0.00 0.00 2108 0 0 avg-cpu: %user %nice %system %iowait %steal %idle @@ -29,6 +30,7 @@ avg-cpu: %user %nice %system %iowait %steal %idle Device tps kB_read/s kB_wrtn/s kB_dscd/s kB_read kB_wrtn kB_dscd sda 1604.70 41499.97 10663.48 0.00 1597749 410544 0 +sdd 0.00 0.00 0.00 0.00 0 0 0 sdf 1.22 54.34 0.00 0.00 2092 0 0 sdg 2.91 114.91 0.31 0.00 4424 12 0 @@ -38,6 +40,7 @@ avg-cpu: %user %nice %system %iowait %steal %idle Device tps kB_read/s kB_wrtn/s kB_dscd/s kB_read kB_wrtn kB_dscd sda 0.00 0.00 0.00 0.00 0 0 0 +sdd 0.00 0.00 0.00 0.00 0 0 0 avg-cpu: %user %nice %system %iowait %steal %idle diff --git a/tests/expected.iostat-x-ALL-flush b/tests/expected.iostat-x-ALL-flush new file mode 100644 index 0000000..d7444db --- /dev/null +++ b/tests/expected.iostat-x-ALL-flush @@ -0,0 +1,32 @@ +Linux 1.2.3-TEST (SYSSTAT.TEST) 01/01/70 _x86_64_ (8 CPU) + +avg-cpu: %user %nice %system %iowait %steal %idle + 1.65 44.62 1.85 1.00 0.00 50.88 + +Device r/s rkB/s rrqm/s %rrqm r_await rareq-sz w/s wkB/s wrqm/s %wrqm w_await wareq-sz d/s dkB/s drqm/s %drqm d_await dareq-sz f/s f_await aqu-sz %util +sda 6.85 220.24 0.40 5.55 12.56 32.15 1.69 56.59 1.36 44.59 9.54 33.44 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.10 0.45 +sdb 0.00 0.10 0.00 0.00 47.00 33.62 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +sdc 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +sdd 0.01 0.29 0.00 0.00 55.08 41.33 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 45.80 0.00 0.00 +sde 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +scd0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + + +avg-cpu: %user %nice %system %iowait %steal %idle + 2.99 12.51 2.49 0.20 0.00 81.81 + +Device r/s rkB/s rrqm/s %rrqm r_await rareq-sz w/s wkB/s wrqm/s %wrqm w_await wareq-sz d/s dkB/s drqm/s %drqm d_await dareq-sz f/s f_await aqu-sz %util +sda 1288.34 41499.97 73.30 5.38 12.58 32.21 316.36 10663.48 254.13 44.55 9.61 33.71 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 18.56 85.36 +sdd 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.32 60.31 0.00 0.00 +sdf 1.22 54.34 0.00 0.00 62.51 44.51 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.08 0.09 +sdg 2.83 114.91 0.03 0.91 25.06 40.59 0.08 0.31 0.00 0.00 13.33 4.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.07 0.19 + + +avg-cpu: %user %nice %system %iowait %steal %idle + 7.51 12.53 4.64 0.30 0.00 75.02 + +Device r/s rkB/s rrqm/s %rrqm r_await rareq-sz w/s wkB/s wrqm/s %wrqm w_await wareq-sz d/s dkB/s drqm/s %drqm d_await dareq-sz f/s f_await aqu-sz %util +sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +sdd 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.52 59.32 0.00 0.00 + + diff --git a/tests/expected.iostat-xs b/tests/expected.iostat-xs index 55ce2c8..5b03826 100644 --- a/tests/expected.iostat-xs +++ b/tests/expected.iostat-xs @@ -22,5 +22,6 @@ avg-cpu: %user %nice %system %iowait %steal %idle Device tps kB/s rqm/s await areq-sz aqu-sz %util sda 6.40 3.20 6.40 1.00 0.50 0.00 0.32 sdb 0.67 22.60 0.00 47.00 33.62 0.10 0.05 +sdd 1.63 67.48 0.00 55.08 41.33 0.09 0.13 diff --git a/tests/expected.iostat-ym b/tests/expected.iostat-ym index 3a80b2d..77f7876 100644 --- a/tests/expected.iostat-ym +++ b/tests/expected.iostat-ym @@ -15,5 +15,6 @@ avg-cpu: %user %nice %system %iowait %steal %idle Device tps MB_read/s MB_wrtn/s MB_dscd/s MB_read MB_wrtn MB_dscd sda 6.40 0.00 0.00 0.00 0 0 0 sdb 0.67 0.02 0.00 0.00 0 0 0 +sdd 1.63 0.07 0.00 0.00 2 0 0 diff --git a/tests/root3/sys/block/sdd/stat b/tests/root3/sys/block/sdd/stat index 8f47895..6423ab7 100644 --- a/tests/root3/sys/block/sdd/stat +++ b/tests/root3/sys/block/sdd/stat @@ -1 +1 @@ -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +51 0 4216 2809 0 0 0 0 0 42 2792 0 0 0 0 25 1145 diff --git a/tests/root4/sys/block/sdd/stat b/tests/root4/sys/block/sdd/stat new file mode 100644 index 0000000..562b467 --- /dev/null +++ b/tests/root4/sys/block/sdd/stat @@ -0,0 +1 @@ +51 0 4216 2809 0 0 0 0 0 42 2792 0 0 0 0 76 4221 diff --git a/tests/root5/sys/block/sdd/stat b/tests/root5/sys/block/sdd/stat new file mode 100644 index 0000000..4bb34c7 --- /dev/null +++ b/tests/root5/sys/block/sdd/stat @@ -0,0 +1 @@ +51 0 4216 2809 0 0 0 0 0 42 2792 0 0 0 0 110 6238