]> granicus.if.org Git - sysstat/commitdiff
simtest: Add non regression tests for device mapper names used by iostat
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 17 Jul 2021 06:31:43 +0000 (08:31 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 17 Jul 2021 06:31:43 +0000 (08:31 +0200)
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
tests/02642 [new file with mode: 0644]
tests/02644 [new file with mode: 0644]
tests/TLIST
tests/expected.iostat-N-list1 [new file with mode: 0644]
tests/expected.iostat-N-list2 [new file with mode: 0644]

diff --git a/tests/02642 b/tests/02642
new file mode 100644 (file)
index 0000000..633bd83
--- /dev/null
@@ -0,0 +1,3 @@
+rm -f tests/root
+ln -s root1 tests/root
+LC_ALL=C TZ=GMT ./iostat -N dm-2 sda1 > tests/out.iostat-N-list1.tmp && diff -u tests/expected.iostat-N-list1 tests/out.iostat-N-list1.tmp
diff --git a/tests/02644 b/tests/02644
new file mode 100644 (file)
index 0000000..6382e4d
--- /dev/null
@@ -0,0 +1,3 @@
+rm -f tests/root
+ln -s root1 tests/root
+LC_ALL=C TZ=GMT ./iostat -dN virtualhd sdr > tests/out.iostat-N-list2.tmp && diff -u tests/expected.iostat-N-list2 tests/out.iostat-N-list2.tmp
index 382e1f447a72396542f19c635d049032f665cd59..d392d3542535c24e974da0ab4b4ee93c5c54a662 100644 (file)
@@ -361,6 +361,8 @@ NOTES:
 02620  LC_ALL=C TZ=GMT ./iostat -dh -p ALL > tests/out.iostat-h.tmp
 02630  LC_ALL=C TZ=GMT ./iostat -kz -p ALL 1 2 > tests/out.iostat-kz.tmp
 02640  LC_ALL=C TZ=GMT ./iostat -dN -p ALL > tests/out.iostat-N.tmp
+02642  LC_ALL=C TZ=GMT ./iostat -N dm-2 sda1 > tests/out.iostat-N-list1.tmp
+02644  LC_ALL=C TZ=GMT ./iostat -dN virtualhd sdr > tests/out.iostat-N-list2.tmp
 02650  LC_ALL=C TZ=GMT ./iostat -d -j LABEL OS SYSTEM 1 2 > tests/out.iostat-jLABEL-list.tmp
 02660  LC_ALL=C TZ=GMT ./iostat -dxs -j UUID 2578463f-6947-48c7-8b09-876a4145cfb1 1 2 > tests/out.iostat-jUUID-list.tmp
 02665  LC_ALL=C TZ=GMT ./iostat -d -j UUID 12345678-abcd-98ef-8521-7539adfbaf90 > tests/out.iostat-jUUID-list2.tmp
diff --git a/tests/expected.iostat-N-list1 b/tests/expected.iostat-N-list1
new file mode 100644 (file)
index 0000000..d8d59e2
--- /dev/null
@@ -0,0 +1,10 @@
+Linux 1.2.3-TEST (SYSSTAT.TEST)        01/01/70        _x86_64_        (9 CPU)
+
+avg-cpu:  %user   %nice %system %iowait  %steal   %idle
+           1.49   39.91    1.67    0.94    0.00   56.00
+
+Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
+virtualhd         0.00         0.00         0.00         0.00          0          0          0
+sda1              0.01         0.29         0.00         0.00       2108          0          0
+
+
diff --git a/tests/expected.iostat-N-list2 b/tests/expected.iostat-N-list2
new file mode 100644 (file)
index 0000000..efe8b34
--- /dev/null
@@ -0,0 +1,7 @@
+Linux 1.2.3-TEST (SYSSTAT.TEST)        01/01/70        _x86_64_        (9 CPU)
+
+Device             tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd
+virtualhd         0.00         0.00         0.00         0.00          0          0          0
+sdr               2.77        29.93        19.48         0.00     215243     140127          0
+
+