From: Sebastien GODARD Date: Sat, 21 Sep 2019 09:53:26 +0000 (+0200) Subject: simtest: Add non regression test on datafiles extra structures X-Git-Tag: v12.1.7~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=066fd8da31e79db1b6caa9bf67e9affaf76999a2;p=sysstat simtest: Add non regression test on datafiles extra structures 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 --- diff --git a/tests/00770 b/tests/00770 new file mode 100644 index 0000000..138a123 --- /dev/null +++ b/tests/00770 @@ -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 index 0000000..bc84724 --- /dev/null +++ b/tests/00772 @@ -0,0 +1 @@ +diff -u tests/out.data-extra-12.1.7.tmp tests/expected.data-extra-12.1.7 diff --git a/tests/TLIST b/tests/TLIST index b0e58ba..69628d1 100644 --- a/tests/TLIST +++ b/tests/TLIST @@ -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 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 index 0000000..2b2cc10 --- /dev/null +++ b/tests/expected.data-extra-12.1.7 @@ -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