]> granicus.if.org Git - sysstat/commitdiff
simtest: Add non regression test on datafiles extra structures
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 21 Sep 2019 09:53:26 +0000 (11:53 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 21 Sep 2019 09:53:26 +0000 (11:53 +0200)
data-extra-12.1.7 is a binary datafile with a next generation format (it
contains various extra structures that could be added in a future
sysstat version).
This test makes sure that current sysstat version will be able to read
such a format.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
tests/00770 [new file with mode: 0644]
tests/00772 [new file with mode: 0644]
tests/TLIST
tests/data-extra-12.1.7 [new file with mode: 0644]
tests/expected.data-extra-12.1.7 [new file with mode: 0644]

diff --git a/tests/00770 b/tests/00770
new file mode 100644 (file)
index 0000000..138a123
--- /dev/null
@@ -0,0 +1 @@
+LC_ALL=C TZ=GMT ./sar -A -f tests/data-extra-12.1.7 > tests/out.data-extra-12.1.7.tmp
diff --git a/tests/00772 b/tests/00772
new file mode 100644 (file)
index 0000000..bc84724
--- /dev/null
@@ -0,0 +1 @@
+diff -u tests/out.data-extra-12.1.7.tmp tests/expected.data-extra-12.1.7
index b0e58ba851af3f960f62c1dc17622a709b66dfd8..69628d1e34f2da6b4fb9919c578b55ade0c3c595 100644 (file)
@@ -100,6 +100,10 @@ NOTES:
        [There may be some small differences in ext disks stats between initial and current version
        outputs, because initial version doesn't take into account discard fields]
 
+=====  Reading datafile with extra structures
+00770  LC_ALL=C TZ=GMT ./sar -A -f tests/data-extra-12.1.7 > tests/out.data-extra-12.1.7.tmp
+00772  diff -u tests/out.data-extra-12.1.7.tmp tests/expected.data-extra-12.1.7
+
 =====  Testing sar's options
 00800  LC_ALL=C TZ=GMT ./sar --iface=lo,enp6s0,eth0 -n DEV,EDEV -f tests/data.tmp > tests/out.sar-iface.tmp
 00802  diff -u tests/out.sar-iface.tmp tests/expected.sar-iface
diff --git a/tests/data-extra-12.1.7 b/tests/data-extra-12.1.7
new file mode 100644 (file)
index 0000000..7e89912
Binary files /dev/null and b/tests/data-extra-12.1.7 differ
diff --git a/tests/expected.data-extra-12.1.7 b/tests/expected.data-extra-12.1.7
new file mode 100644 (file)
index 0000000..2b2cc10
--- /dev/null
@@ -0,0 +1,15 @@
+Linux 5.0.16-100.fc28.x86_64 (localhost.localdomain)   09/15/19        _x86_64_        (2 CPU)
+
+09:33:20     LINUX RESTART     (2 CPU)
+
+09:36:40        CPU      %usr     %nice      %sys   %iowait    %steal      %irq     %soft    %guest    %gnice     %idle
+09:38:20        all     50.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00     50.00
+09:38:20          0    100.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
+09:38:20          1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00    100.00
+Average:        all     50.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00     50.00
+Average:          0    100.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
+Average:          1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00    100.00
+
+09:36:40       proc/s   cswch/s
+09:38:20       100.00   1000.00
+Average:       100.00   1000.00