]> granicus.if.org Git - sysstat/commitdiff
iostat: Add new non regression tests
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 20 Jul 2019 09:23:51 +0000 (11:23 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 20 Jul 2019 09:23:51 +0000 (11:23 +0200)
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
tests/02380 [new file with mode: 0644]
tests/02385 [new file with mode: 0644]
tests/02650 [new file with mode: 0644]
tests/02655 [new file with mode: 0644]
tests/02660 [new file with mode: 0644]
tests/02665 [new file with mode: 0644]
tests/TLIST
tests/expected.iostat-jLABEL-list [new file with mode: 0644]
tests/expected.iostat-jUUID-list [new file with mode: 0644]
tests/expected.iostat-xs-list-part [new file with mode: 0644]

diff --git a/tests/02380 b/tests/02380
new file mode 100644 (file)
index 0000000..5650c84
--- /dev/null
@@ -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 (file)
index 0000000..624bc6d
--- /dev/null
@@ -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 (file)
index 0000000..fe973cc
--- /dev/null
@@ -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 (file)
index 0000000..964cd5f
--- /dev/null
@@ -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 (file)
index 0000000..75da5cc
--- /dev/null
@@ -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 (file)
index 0000000..1050b96
--- /dev/null
@@ -0,0 +1 @@
+diff -u tests/out.iostat-jUUID-list.tmp tests/expected.iostat-jUUID-list
index a4bcc1e0812df41ec5ee211bd0075e45a7983a00..294ff3103c5bfbb2292898e3c1d973fec76f5811 100644 (file)
@@ -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 (file)
index 0000000..f0b6e6e
--- /dev/null
@@ -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 (file)
index 0000000..c0c469d
--- /dev/null
@@ -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 (file)
index 0000000..e8b7349
--- /dev/null
@@ -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
+
+