From 3fc5fa94f0df45d174199e3c4eeb7624d95501ed Mon Sep 17 00:00:00 2001 From: Sebastien GODARD Date: Sat, 20 Jul 2019 11:23:51 +0200 Subject: [PATCH] iostat: Add new non regression tests Signed-off-by: Sebastien GODARD --- tests/02380 | 3 +++ tests/02385 | 1 + tests/02650 | 3 +++ tests/02655 | 1 + tests/02660 | 3 +++ tests/02665 | 1 + tests/TLIST | 6 ++++++ tests/expected.iostat-jLABEL-list | 12 ++++++++++++ tests/expected.iostat-jUUID-list | 10 ++++++++++ tests/expected.iostat-xs-list-part | 26 ++++++++++++++++++++++++++ 10 files changed, 66 insertions(+) create mode 100644 tests/02380 create mode 100644 tests/02385 create mode 100644 tests/02650 create mode 100644 tests/02655 create mode 100644 tests/02660 create mode 100644 tests/02665 create mode 100644 tests/expected.iostat-jLABEL-list create mode 100644 tests/expected.iostat-jUUID-list create mode 100644 tests/expected.iostat-xs-list-part diff --git a/tests/02380 b/tests/02380 new file mode 100644 index 0000000..5650c84 --- /dev/null +++ b/tests/02380 @@ -0,0 +1,3 @@ +rm -f tests/root +ln -s root1 tests/root +LC_ALL=C ./iostat -xs sda3 sda1 1 3 > tests/out.iostat-xs-list-part.tmp diff --git a/tests/02385 b/tests/02385 new file mode 100644 index 0000000..624bc6d --- /dev/null +++ b/tests/02385 @@ -0,0 +1 @@ +diff -u tests/out.iostat-xs-list-part.tmp tests/expected.iostat-xs-list-part diff --git a/tests/02650 b/tests/02650 new file mode 100644 index 0000000..fe973cc --- /dev/null +++ b/tests/02650 @@ -0,0 +1,3 @@ +rm -f tests/root +ln -s root1 tests/root +LC_ALL=C ./iostat -d -j LABEL OS SYSTEM 1 2 > tests/out.iostat-jLABEL-list.tmp diff --git a/tests/02655 b/tests/02655 new file mode 100644 index 0000000..964cd5f --- /dev/null +++ b/tests/02655 @@ -0,0 +1 @@ +diff -u tests/out.iostat-jLABEL-list.tmp tests/expected.iostat-jLABEL-list diff --git a/tests/02660 b/tests/02660 new file mode 100644 index 0000000..75da5cc --- /dev/null +++ b/tests/02660 @@ -0,0 +1,3 @@ +rm -f tests/root +ln -s root1 tests/root +LC_ALL=C ./iostat -dxs -j UUID 2578463f-6947-48c7-8b09-876a4145cfb1 1 2 > tests/out.iostat-jUUID-list.tmp diff --git a/tests/02665 b/tests/02665 new file mode 100644 index 0000000..1050b96 --- /dev/null +++ b/tests/02665 @@ -0,0 +1 @@ +diff -u tests/out.iostat-jUUID-list.tmp tests/expected.iostat-jUUID-list diff --git a/tests/TLIST b/tests/TLIST index a4bcc1e..294ff31 100644 --- a/tests/TLIST +++ b/tests/TLIST @@ -288,6 +288,8 @@ NOTES: 02345 diff -u tests/out.iostat-xs-p-sda.tmp tests/expected.iostat-xs-p-sda 02370 LC_ALL=C ./iostat -xs sda1 sda3 sdc1 -p sdb,sdd > tests/out.iostat-xs-list.tmp 02375 diff -u tests/out.iostat-xs-list.tmp tests/expected.iostat-xs-list +02380 LC_ALL=C ./iostat -xs sda3 sda1 1 3 > tests/out.iostat-xs-list-part.tmp +02385 diff -u tests/out.iostat-xs-list-part.tmp tests/expected.iostat-xs-list-part ===== Playing with iostat 02410 LC_ALL=C ./iostat 2 > tests/out.iostat-sigint.tmp @@ -330,3 +332,7 @@ NOTES: 02635 diff -u tests/out.iostat-kz.tmp tests/expected.iostat-kz 02640 LC_ALL=C ./iostat -dN -p ALL > tests/out.iostat-N.tmp 02645 diff -u tests/out.iostat-N.tmp tests/expected.iostat-N +02650 LC_ALL=C ./iostat -d -j LABEL OS SYSTEM 1 2 > tests/out.iostat-jLABEL-list.tmp +02655 diff -u tests/out.iostat-jLABEL-list.tmp tests/expected.iostat-jLABEL-list +02660 LC_ALL=C ./iostat -dxs -j UUID 2578463f-6947-48c7-8b09-876a4145cfb1 1 2 > tests/out.iostat-jUUID-list.tmp +02665 diff -u tests/out.iostat-jUUID-list.tmp tests/expected.iostat-jUUID-list diff --git a/tests/expected.iostat-jLABEL-list b/tests/expected.iostat-jLABEL-list new file mode 100644 index 0000000..f0b6e6e --- /dev/null +++ b/tests/expected.iostat-jLABEL-list @@ -0,0 +1,12 @@ +Linux 1.2.3-TEST (SYSSTAT.TEST) 01/01/70 _x86_64_ (8 CPU) + + tps kB_read/s kB_wrtn/s kB_dscd/s kB_read kB_wrtn kB_dscd Device + 0.01 0.29 0.00 0.00 2108 0 0 SYSTEM + 0.01 0.29 0.00 0.00 2092 0 0 OS + + + tps kB_read/s kB_wrtn/s kB_dscd/s kB_read kB_wrtn kB_dscd Device + 0.00 0.00 0.00 0.00 0 0 0 SYSTEM + 0.00 0.00 0.00 0.00 0 0 0 OS + + diff --git a/tests/expected.iostat-jUUID-list b/tests/expected.iostat-jUUID-list new file mode 100644 index 0000000..c0c469d --- /dev/null +++ b/tests/expected.iostat-jUUID-list @@ -0,0 +1,10 @@ +Linux 1.2.3-TEST (SYSSTAT.TEST) 01/01/70 _x86_64_ (8 CPU) + + tps kB/s rqm/s await areq-sz aqu-sz %util Device + 0.01 0.31 0.00 209.25 39.51 0.00 0.00 2578463f-6947-48c7-8b09-876a4145cfb1 + + + tps kB/s rqm/s await areq-sz aqu-sz %util Device + 0.00 0.00 0.00 0.00 0.00 0.00 0.00 2578463f-6947-48c7-8b09-876a4145cfb1 + + diff --git a/tests/expected.iostat-xs-list-part b/tests/expected.iostat-xs-list-part new file mode 100644 index 0000000..e8b7349 --- /dev/null +++ b/tests/expected.iostat-xs-list-part @@ -0,0 +1,26 @@ +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.90 1.84 1.01 0.00 50.60 + +Device tps kB/s rqm/s await areq-sz aqu-sz %util +sda1 0.01 0.29 0.00 60.92 41.33 0.00 0.00 +sda3 0.01 0.29 0.00 57.78 42.86 0.00 0.00 + + +avg-cpu: %user %nice %system %iowait %steal %idle + 2.15 12.50 2.35 0.12 0.00 82.89 + +Device tps kB/s rqm/s await areq-sz aqu-sz %util +sda1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 +sda3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + + +avg-cpu: %user %nice %system %iowait %steal %idle + 1.96 12.49 1.91 0.52 0.00 83.13 + +Device tps kB/s rqm/s await areq-sz aqu-sz %util +sda1 6.40 3.20 6.40 1.00 0.50 0.00 0.32 +sda3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + + -- 2.40.0