From: Sebastien GODARD Date: Sat, 16 Jan 2021 16:56:11 +0000 (+0100) Subject: tests: Add new non regression tests X-Git-Tag: v12.5.3~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b980acdc9eefa8110058c924da9740082063035b;p=sysstat tests: Add new non regression tests Signed-off-by: Sebastien GODARD --- diff --git a/tests/00525 b/tests/00525 new file mode 100644 index 0000000..28d07f1 --- /dev/null +++ b/tests/00525 @@ -0,0 +1 @@ +LC_ALL=C ./sadf -x tests/datax.tmp -C 1 2 -- -uw -P 0-2 > tests/out1.sadf-x.tmp && diff -u tests/expected1.sadf-x tests/out1.sadf-x.tmp diff --git a/tests/01030 b/tests/01030 new file mode 100644 index 0000000..2b5e357 --- /dev/null +++ b/tests/01030 @@ -0,0 +1 @@ +LC_ALL=C TZ=GMT ./sar -f tests/datax.tmp 1 1 -C -uw -P 0-2 > tests/out.sar-11.tmp && diff -u tests/expected.sar-11 tests/out.sar-11.tmp diff --git a/tests/TLIST b/tests/TLIST index c640db5..fa9b7cd 100644 --- a/tests/TLIST +++ b/tests/TLIST @@ -107,6 +107,7 @@ NOTES: 00510 LC_ALL=C ./sadf -d tests/data.tmp -C -- -A > tests/out.sadf-d.tmp 00515 LC_ALL=C ./sadf -d tests/data.tmp -- -qu > tests/out.sadf-d-qu.tmp 00520 LC_ALL=C ./sadf -x tests/data.tmp -C -- -A > tests/out.sadf-x.tmp +00525 LC_ALL=C ./sadf -x tests/datax.tmp -C 1 2 -- -uw -P 0-2 > tests/out1.sadf-x.tmp 00530 LC_ALL=C ./sadf -j tests/data.tmp -C -- -A > tests/out.sadf-j.tmp 00540 LC_ALL=C ./sadf -g tests/data.tmp -C -- -A > tests/out.sadf-g.tmp 00542 LC_ALL=C ./sadf -O height=370 -g tests/data.tmp > tests/out3.sadf-g.tmp @@ -195,6 +196,7 @@ NOTES: 00980 LC_ALL=C TZ=GMT ./sar -f tests/data2.tmp -q ALL > tests/out2.sar-q.tmp 01010 LC_ALL=C TZ=GMT ./sar -f tests/data1.tmp -q ALL > tests/out2.sar-qALL.tmp 01020 LC_ALL=C TZ=GMT ./sadc --unix_time=1555593609 -S A_NULL,A_PSI_CPU tests/data1.tmp 1 1 2>&1 | grep "Requested activities not available" +01030 LC_ALL=C TZ=GMT ./sar -f tests/datax.tmp 1 1 -C -uw -P 0-2 > tests/out.sar-11.tmp ===== sar/sadf: Reading data0.tmp 01100 LC_ALL=C TZ=GMT ./sar -A -f tests/data0.tmp > tests/out0.sar-A.tmp diff --git a/tests/expected.sar-11 b/tests/expected.sar-11 new file mode 100644 index 0000000..9aedc0e --- /dev/null +++ b/tests/expected.sar-11 @@ -0,0 +1,63 @@ +Linux 1.2.3-TEST (SYSSTAT.TEST) 04/18/19 _x86_64_ (9 CPU) + +13:20:09 LINUX RESTART (9 CPU) +13:20:13 COM First comment! + +13:20:15 CPU %user %nice %system %iowait %steal %idle +13:20:19 0 2.71 0.03 3.12 0.00 0.00 94.14 +13:20:19 1 2.85 0.00 5.16 0.00 0.00 91.99 +13:20:19 2 2.25 0.03 1.86 0.68 0.00 95.18 + +Average: CPU %user %nice %system %iowait %steal %idle +Average: 0 2.71 0.03 3.12 0.00 0.00 94.14 +Average: 1 2.85 0.00 5.16 0.00 0.00 91.99 +Average: 2 2.25 0.03 1.86 0.68 0.00 95.18 + +13:20:15 proc/s cswch/s +13:20:19 3.56 68409.30 + +Average: proc/s cswch/s +Average: 3.56 68409.30 + +13:22:11 LINUX RESTART (9 CPU) + +13:22:21 CPU %user %nice %system %iowait %steal %idle +13:22:31 0 2.71 0.03 3.12 0.00 0.00 94.14 +13:22:31 1 2.85 0.00 5.16 0.00 0.00 91.99 +13:22:31 2 2.25 0.03 1.86 0.68 0.00 95.18 + +Average: CPU %user %nice %system %iowait %steal %idle +Average: 0 2.71 0.03 3.12 0.00 0.00 94.14 +Average: 1 2.85 0.00 5.16 0.00 0.00 91.99 +Average: 2 2.25 0.03 1.86 0.68 0.00 95.18 + +13:22:21 proc/s cswch/s +13:22:31 3.56 68409.30 + +Average: proc/s cswch/s +Average: 3.56 68409.30 +13:22:35 COM Second comment! + +13:23:20 LINUX RESTART (9 CPU) + +13:24:10 LINUX RESTART (9 CPU) + +13:24:12 LINUX RESTART (9 CPU) + +13:24:20 CPU %user %nice %system %iowait %steal %idle +13:24:25 0 2.71 0.03 3.12 0.00 0.00 94.14 +13:24:25 1 2.85 0.00 5.16 0.00 0.00 91.99 +13:24:25 2 2.25 0.03 1.86 0.68 0.00 95.18 + +Average: CPU %user %nice %system %iowait %steal %idle +Average: 0 2.71 0.03 3.12 0.00 0.00 94.14 +Average: 1 2.85 0.00 5.16 0.00 0.00 91.99 +Average: 2 2.25 0.03 1.86 0.68 0.00 95.18 + +13:24:20 proc/s cswch/s +13:24:25 3.56 68409.30 + +Average: proc/s cswch/s +Average: 3.56 68409.30 +13:22:46 COM Third... +13:22:47 COM and fourth comment! diff --git a/tests/expected1.sadf-x b/tests/expected1.sadf-x new file mode 100644 index 0000000..09ab22f --- /dev/null +++ b/tests/expected1.sadf-x @@ -0,0 +1,73 @@ + + + + 3.9 + + Linux + 1.2.3-TEST + x86_64 + 9 + 2019-04-18 + 13:20:09 + GMT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +