sadf: Add a non regression test
authorSebastien GODARD <sysstat@users.noreply.github.com>
Tue, 26 Jan 2021 17:08:36 +0000 (18:08 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Tue, 26 Jan 2021 17:08:36 +0000 (18:08 +0100)
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
tests/00585 [new file with mode: 0644]
tests/TLIST
tests/expected.sadf-i [new file with mode: 0644]

diff --git a/tests/00585 b/tests/00585
new file mode 100644 (file)
index 0000000..2586bfd
--- /dev/null
@@ -0,0 +1 @@
+LC_ALL=C ./sadf -d --iface=enp6s0 tests/data-long.tmp -- -n DEV 65 > tests/out.sadf-i.tmp && diff -u tests/expected.sadf-i tests/out.sadf-i.tmp
index d8b95981c2d3fd37ea270cc7a8a0d180af7acc5d..5aa891b839b166a8e56505158ddcdd099e95be8e 100644 (file)
@@ -120,6 +120,7 @@ NOTES:
 00560  LC_ALL=C ./sadf -H tests/data.tmp > tests/out.sadf-H.tmp
 00570  ./sadf -r -O debug tests/data.tmp -C -- -A > tests/out.sadf-r.tmp
 00580  LC_ALL=C ./sadf -d -s 13:20:20 -e 13:20:40 --iface=enp6s0 --dev=sda --fs=/dev/sda6 tests/data.tmp -- -n DEV -Fdp > tests/out.sadf-se.tmp
+00585  LC_ALL=C ./sadf -d --iface=enp6s0 tests/data-long.tmp -- -n DEV 65 > tests/out.sadf-i.tmp
 00590  LC_ALL=C ./sadf -l -O pcparchive=tests/pcpar tests/data.tmp -C -- -A
 
 =====  Checking sadf conversion
diff --git a/tests/expected.sadf-i b/tests/expected.sadf-i
new file mode 100644 (file)
index 0000000..fd0bc2c
--- /dev/null
@@ -0,0 +1,3 @@
+# hostname;interval;timestamp;IFACE;rxpck/s;txpck/s;rxkB/s;txkB/s;rxcmp/s;txcmp/s;rxmcst/s;%ifutil
+SYSSTAT.TEST;62;2019-04-18 13:20:29 UTC;enp6s0;26.81;8.73;32.22;1.69;0.00;0.00;4.63;0.03
+SYSSTAT.TEST;61;2019-04-18 13:20:49 UTC;enp6s0;2720.22;887.21;3269.50;171.66;0.00;0.00;42.73;2.68