From 033a58a12c5a8cea601b555048024218d2c784d1 Mon Sep 17 00:00:00 2001 From: Sebastien GODARD Date: Sun, 3 Nov 2019 11:31:56 +0100 Subject: [PATCH] simtest: Add more non regression tests Signed-off-by: Sebastien GODARD --- tests/00542 | 1 + tests/00543 | 1 + tests/00720 | 1 + tests/00722 | 1 + tests/TLIST | 6 +++ tests/data-non-printable | Bin 0 -> 536 bytes tests/expected.sar-non-printable | 2 + tests/expected3.sadf-g | 65 +++++++++++++++++++++++++++++++ 8 files changed, 77 insertions(+) create mode 100644 tests/00542 create mode 100644 tests/00543 create mode 100644 tests/00720 create mode 100644 tests/00722 create mode 100644 tests/data-non-printable create mode 100644 tests/expected.sar-non-printable create mode 100644 tests/expected3.sadf-g diff --git a/tests/00542 b/tests/00542 new file mode 100644 index 0000000..811c8be --- /dev/null +++ b/tests/00542 @@ -0,0 +1 @@ +LC_ALL=C ./sadf -O height=370 -g tests/data.tmp > tests/out3.sadf-g.tmp diff --git a/tests/00543 b/tests/00543 new file mode 100644 index 0000000..3a69be7 --- /dev/null +++ b/tests/00543 @@ -0,0 +1 @@ +diff -u tests/out3.sadf-g.tmp tests/expected3.sadf-g diff --git a/tests/00720 b/tests/00720 new file mode 100644 index 0000000..8bd402e --- /dev/null +++ b/tests/00720 @@ -0,0 +1 @@ +LC_ALL=C TZ=GMT ./sar -C -f tests/data-non-printable > tests/out.sar-non-printable.tmp diff --git a/tests/00722 b/tests/00722 new file mode 100644 index 0000000..f425599 --- /dev/null +++ b/tests/00722 @@ -0,0 +1 @@ +diff -u tests/out.sar-non-printable.tmp tests/expected.sar-non-printable diff --git a/tests/TLIST b/tests/TLIST index f969b57..e422f09 100644 --- a/tests/TLIST +++ b/tests/TLIST @@ -88,6 +88,8 @@ NOTES: 00531 diff -u tests/out.sadf-j.tmp tests/expected.sadf-j 00540 LC_ALL=C ./sadf -g tests/data.tmp -C -- -A > tests/out.sadf-g.tmp 00541 diff -u tests/out.sadf-g.tmp tests/expected.sadf-g +00542 LC_ALL=C ./sadf -O height=370 -g tests/data.tmp > tests/out3.sadf-g.tmp +00543 diff -u tests/out3.sadf-g.tmp tests/expected3.sadf-g 00545 LC_ALL=C ./sadf -g tests/data.tmp -- -F MOUNT > tests/out1.sadf-g.tmp 00546 diff -u tests/out1.sadf-g.tmp tests/expected1.sadf-g 00550 LC_ALL=C TZ=GMT ./sadf -g -O autoscale,packed,oneday,showidle,showtoc,skipempty,showinfo,bwcol tests/data.tmp -T -C -- -A > tests/out2.sadf-g.tmp @@ -119,6 +121,10 @@ NOTES: 00700 LC_ALL=C TZ=GMT ./sar -C -A -f tests/data-ppc-11.7.2 > tests/out.data-ppc-11.7.2.tmp 00702 diff -u tests/out.data-ppc-11.7.2.tmp tests/expected.data-ppc-11.7.2 +===== Reading datafile with non printable chrs in comment (created using hexedit) +00720 LC_ALL=C TZ=GMT ./sar -C -f tests/data-non-printable > tests/out.sar-non-printable.tmp +00722 diff -u tests/out.sar-non-printable.tmp tests/expected.sar-non-printable + ===== Reading data.tmp using an old sysstat version 00750 LC_ALL=C TZ=GMT ./tests/ini/inisar -C -A -f tests/data.tmp > tests/out.data-ini.tmp 00752 diff -u tests/out.data-ini.tmp tests/expected.data-ini diff --git a/tests/data-non-printable b/tests/data-non-printable new file mode 100644 index 0000000000000000000000000000000000000000..b54e4b12b255db5149861ac5f1cfc022da959db1 GIT binary patch literal 536 zcmbPswN#OZiGd-2kpT=q6bSP`xFnHEEB3{LG^9XvaRO;eZhysZLtpfv)oC*+2 zK)4LdTpT``d8HLlE?HC#$N;^J{M=Nsv@KW)6n&}!E80e)X8(HX8SeV6|nUG)@ z$r{kjc6JSc2!X<<8;D`y2;v6-F&7Y{16bID#96p`j670va`IW(^LcYp6w%cZ!v_F+ CX&LMQ literal 0 HcmV?d00001 diff --git a/tests/expected.sar-non-printable b/tests/expected.sar-non-printable new file mode 100644 index 0000000..f5096e6 --- /dev/null +++ b/tests/expected.sar-non-printable @@ -0,0 +1,2 @@ +Linux 5.0.16-100.fc28.x86_64 (linux.home) 11/03/19 _x86_64_ (8 CPU) +10:12:50 COM Hello..o.ld! diff --git a/tests/expected3.sadf-g b/tests/expected3.sadf-g new file mode 100644 index 0000000..311e136 --- /dev/null +++ b/tests/expected3.sadf-g @@ -0,0 +1,65 @@ + + + +Linux 1.2.3-TEST (SYSSTAT.TEST) 04/18/19 _x86_64_ (8 CPU) + + + +CPU utilization [all] +(Min, Max values) + + +%user (2.15, 6.53) +%nice (0.00, 23.20) +%system (1.93, 4.42) +%iowait (0.12, 0.77) +%steal (0.00, 0.00) + +0. + +25. + +50. + +75. + +100. + +13:20:09 + +13:23:35 + +13:27:01 + +13:30:27 + +13:33:53 + +13:37:19 + +13:40:45 + +13:44:11 + +13:47:37 + +13:51:03 + +13:54:29 +UTC + + + + + + + + + + + + + + + + -- 2.40.0