From: Sebastien GODARD Date: Sat, 19 Dec 2020 08:12:14 +0000 (+0100) Subject: simtest: Update non regression tests X-Git-Tag: v12.5.2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8236fada63594284d08cece9faed4a785f9846fa;p=sysstat simtest: Update non regression tests Signed-off-by: Sebastien GODARD --- diff --git a/tests/00050 b/tests/00050 index c8eec76..3708ca0 100644 --- a/tests/00050 +++ b/tests/00050 @@ -1,21 +1,21 @@ -rm -f tests/data.tmp +rm -f tests/data-new.tmp rm -f tests/root ln -s root1 tests/root -TZ=GMT ./sadc --unix_time=1555593609 -S XALL,-A_PWR_FAN,-A_PWR_IN,-A_PWR_TEMP,-A_PWR_FREQ tests/data.tmp 1 1 >/dev/null +TZ=GMT ./sadc --unix_time=1555593609 -S XALL,-A_PWR_FAN,-A_PWR_IN,-A_PWR_TEMP,-A_PWR_FREQ tests/data-new.tmp 1 1 >/dev/null rm -f tests/root ln -s root2 tests/root -TZ=GMT ./sadc --unix_time=1555593619 -S XALL tests/data.tmp 1 1 >/dev/null +TZ=GMT ./sadc --unix_time=1555593619 -S XALL tests/data-new.tmp 1 1 >/dev/null rm -f tests/root ln -s root3 tests/root -TZ=GMT ./sadc --unix_time=1555593629 -S XALL tests/data.tmp 1 1 >/dev/null +TZ=GMT ./sadc --unix_time=1555593629 -S XALL tests/data-new.tmp 1 1 >/dev/null rm -f tests/root ln -s root4 tests/root -TZ=GMT ./sadc --unix_time=1555593639 -S XALL tests/data.tmp 1 1 >/dev/null +TZ=GMT ./sadc --unix_time=1555593639 -S XALL tests/data-new.tmp 1 1 >/dev/null rm -f tests/root ln -s root5 tests/root -TZ=GMT ./sadc --unix_time=1555593649 -S XALL tests/data.tmp 1 1 >/dev/null +TZ=GMT ./sadc --unix_time=1555593649 -S XALL tests/data-new.tmp 1 1 >/dev/null diff --git a/tests/00052 b/tests/00052 index e5accdb..13a0ea1 100644 --- a/tests/00052 +++ b/tests/00052 @@ -1,3 +1,3 @@ rm -f tests/root ln -s root1 tests/root -TZ=GMT ./sadc --unix_time=1555594649 tests/data.tmp +TZ=GMT ./sadc --unix_time=1555594649 tests/data-new.tmp diff --git a/tests/00054 b/tests/00054 index 9ba6a4a..32496ee 100644 --- a/tests/00054 +++ b/tests/00054 @@ -1 +1 @@ -TZ=GMT ./sadc --unix_time=1555594749 -C "Testing sysstat!" tests/data.tmp +TZ=GMT ./sadc --unix_time=1555594749 -C "Testing sysstat!" tests/data-new.tmp diff --git a/tests/00055 b/tests/00055 index 31593d7..449d315 100644 --- a/tests/00055 +++ b/tests/00055 @@ -1,4 +1,5 @@ +rm -f tests/data.tmp +cp -f tests/data-new.tmp tests/data.tmp rm -f tests/root ln -s root6 tests/root - TZ=GMT ./sadc --unix_time=1555595649 tests/data.tmp diff --git a/tests/00062 b/tests/00062 index f60fd86..e45cef1 100644 --- a/tests/00062 +++ b/tests/00062 @@ -1,7 +1,9 @@ +rm -f tests/data0-1.tmp +cp -f tests/data0.tmp tests/data0-1.tmp rm -f tests/root ln -s root6 tests/root -TZ=GMT ./sadc --unix_time=1555593630 tests/data0.tmp >/dev/null +TZ=GMT ./sadc --unix_time=1555593630 tests/data0-1.tmp >/dev/null rm -f tests/root ln -s root7 tests/root -TZ=GMT ./sadc --unix_time=1555593651 -S XALL tests/data0.tmp 1 1 >/dev/null +TZ=GMT ./sadc --unix_time=1555593651 -S XALL tests/data0-1.tmp 1 1 >/dev/null diff --git a/tests/00068 b/tests/00068 index 002e0ac..7821bbf 100644 --- a/tests/00068 +++ b/tests/00068 @@ -1,21 +1,20 @@ -rm -f tests/data1.tmp +rm -f tests/data2.tmp rm -f tests/root ln -s root1 tests/root -TZ=GMT ./sadc --unix_time=1555593609 tests/data1.tmp 1 1 >/dev/null +TZ=GMT ./sadc --unix_time=1555593609 tests/data2.tmp 1 1 >/dev/null rm -f tests/root ln -s root2 tests/root -TZ=GMT ./sadc --unix_time=1555593619 tests/data1.tmp 1 1 >/dev/null +TZ=GMT ./sadc --unix_time=1555593619 tests/data2.tmp 1 1 >/dev/null # LINUX RESTART -TZ=GMT ./sadc --unix_time=1555593623 tests/data1.tmp >/dev/null +TZ=GMT ./sadc --unix_time=1555593623 tests/data2.tmp >/dev/null rm -f tests/root ln -s root6 tests/root -TZ=GMT ./sadc --unix_time=1555593629 tests/data1.tmp 1 1 >/dev/null +TZ=GMT ./sadc --unix_time=1555593629 tests/data2.tmp 1 1 >/dev/null rm -f tests/root ln -s root7 tests/root -TZ=GMT ./sadc --unix_time=1555593639 tests/data1.tmp 1 1 >/dev/null - +TZ=GMT ./sadc --unix_time=1555593639 tests/data2.tmp 1 1 >/dev/null diff --git a/tests/00070 b/tests/00070 new file mode 100644 index 0000000..9f89f6f --- /dev/null +++ b/tests/00070 @@ -0,0 +1,9 @@ +rm -f tests/data-ssr.tmp + +rm -f tests/root +ln -s root1 tests/root +TZ=GMT ./sadc --unix_time=1555593609 -S XALL tests/data-ssr.tmp 1 1 >/dev/null + +rm -f tests/root +ln -s root2 tests/root +TZ=GMT ./sadc --unix_time=1555593619 -S XALL tests/data-ssr.tmp 1 1 >/dev/null diff --git a/tests/00090 b/tests/00090 new file mode 100644 index 0000000..feb042a --- /dev/null +++ b/tests/00090 @@ -0,0 +1,14 @@ +. tests/variables +if [ "${TGLIB32}" = "yes" ]; then + rm -f tests/data32-ssr.tmp + + rm -f tests/root + ln -s root1 tests/root + TZ=GMT tests/32bits/sadc32 --unix_time=1555593609 -S XALL tests/data32-ssr.tmp 1 1 >/dev/null + + rm -f tests/root + ln -s root2 tests/root + TZ=GMT tests/32bits/sadc32 --unix_time=1555593619 -S XALL tests/data32-ssr.tmp 1 1 >/dev/null +else + echo Skipped +fi diff --git a/tests/00130 b/tests/00130 index 4e30bc1..ce6bccd 100644 --- a/tests/00130 +++ b/tests/00130 @@ -1 +1 @@ -LC_ALL=C TZ=GMT ./sar -C -u -P ALL -f tests/data.tmp > tests/out.sar-u.tmp && diff -u tests/expected.sar-u tests/out.sar-u.tmp +LC_ALL=C TZ=GMT ./sar -C -u -P ALL -f tests/data-new.tmp > tests/out.sar-u.tmp && diff -u tests/expected.sar-u tests/out.sar-u.tmp diff --git a/tests/00131 b/tests/00131 index 3452602..cb7498e 100644 --- a/tests/00131 +++ b/tests/00131 @@ -1 +1 @@ -LC_ALL=C TZ=GMT ./sar -bBdFHqSvwWy -I SUM -I ALL -m CPU -n ALL -r ALL -u ALL -P ALL -f tests/data.tmp > tests/out.sar-all.tmp && diff -u tests/expected.sar-all tests/out.sar-all.tmp +LC_ALL=C TZ=GMT ./sar -bBdFHqSvwWy -I SUM -I ALL -m CPU -n ALL -r ALL -u ALL -P ALL -f tests/data-new.tmp > tests/out.sar-all.tmp && diff -u tests/expected.sar-all tests/out.sar-all.tmp diff --git a/tests/00132 b/tests/00132 index bd6bdbd..827c4ae 100644 --- a/tests/00132 +++ b/tests/00132 @@ -1 +1 @@ -LC_ALL=C TZ=GMT ./sar -A -I 2-5 -P 3 -f tests/data.tmp > tests/out3.sar-all.tmp && diff -u tests/expected3.sar-all tests/out3.sar-all.tmp +LC_ALL=C TZ=GMT ./sar -A -I 2-5 -P 3 -f tests/data-new.tmp > tests/out3.sar-all.tmp && diff -u tests/expected3.sar-all tests/out3.sar-all.tmp diff --git a/tests/00161 b/tests/00161 index a1b7f29..9fea7e1 100644 --- a/tests/00161 +++ b/tests/00161 @@ -1 +1,3 @@ +rm -f tests/root +ln -s root7 tests/root LC_ALL=C TZ=GMT ./sar -A -f tests/data.tmp > tests/out2.sar-all.tmp && diff -u tests/expected2.sar-all tests/out2.sar-all.tmp diff --git a/tests/00720 b/tests/00720 new file mode 100644 index 0000000..6c498c2 --- /dev/null +++ b/tests/00720 @@ -0,0 +1,6 @@ +. tests/variables +if [ "${TGLIB32}" = "yes" ]; then + LC_ALL=C TZ=GMT ./sar -w -f tests/data32-ssr.tmp > tests/out.sar32-ssr.tmp && diff -u tests/expected.sar32-ssr tests/out.sar32-ssr.tmp +else + echo Skipped +fi diff --git a/tests/00725 b/tests/00725 new file mode 100644 index 0000000..0cf50e2 --- /dev/null +++ b/tests/00725 @@ -0,0 +1,7 @@ +. tests/variables +if [ "${TGLIB32}" = "yes" ]; then +# Don't check output as sensors stats are system dependent + LC_ALL=C TZ=GMT ./sar -A -f tests/data32-ssr.tmp >/dev/null +else + echo Skipped +fi diff --git a/tests/00980 b/tests/00980 index 134b74b..ca77e2f 100644 --- a/tests/00980 +++ b/tests/00980 @@ -1 +1 @@ -LC_ALL=C TZ=GMT ./sar -f tests/data1.tmp -q ALL > tests/out2.sar-q.tmp && diff -u tests/expected2.sar-q tests/out2.sar-q.tmp +LC_ALL=C TZ=GMT ./sar -f tests/data2.tmp -q ALL > tests/out2.sar-q.tmp && diff -u tests/expected2.sar-q tests/out2.sar-q.tmp diff --git a/tests/01210 b/tests/01210 index b93b1c9..0ab80b5 100644 --- a/tests/01210 +++ b/tests/01210 @@ -1 +1 @@ -LC_ALL=C TZ=GMT ./sar -A -f tests/data0.tmp > tests/out01.sar-A.tmp && diff -u tests/expected01.sar-A tests/out01.sar-A.tmp +LC_ALL=C TZ=GMT ./sar -A -f tests/data0-1.tmp > tests/out01.sar-A.tmp && diff -u tests/expected01.sar-A tests/out01.sar-A.tmp diff --git a/tests/01220 b/tests/01220 index c73006f..16f12af 100644 --- a/tests/01220 +++ b/tests/01220 @@ -1 +1 @@ -./sadf -d tests/data0.tmp -- -A > tests/out01.sadf-d.tmp && diff -u tests/expected01.sadf-d tests/out01.sadf-d.tmp +./sadf -d tests/data0-1.tmp -- -A > tests/out01.sadf-d.tmp && diff -u tests/expected01.sadf-d tests/out01.sadf-d.tmp diff --git a/tests/01230 b/tests/01230 index da5bdc6..9aa8697 100644 --- a/tests/01230 +++ b/tests/01230 @@ -1,6 +1,6 @@ . tests/variables if [ ! -z "$VER_JSON" ]; then - ./sadf -j tests/data0.tmp -- -A | $VER_JSON >/dev/null + ./sadf -j tests/data0-1.tmp -- -A | $VER_JSON >/dev/null else echo Skipped fi diff --git a/tests/01240 b/tests/01240 index e4a1ccc..3922a00 100644 --- a/tests/01240 +++ b/tests/01240 @@ -1 +1 @@ -LC_ALL=C ./sadf -g tests/data0.tmp -- -A > tests/out01.sadf-g.tmp && diff -u tests/expected01.sadf-g tests/out01.sadf-g.tmp +LC_ALL=C ./sadf -g tests/data0-1.tmp -- -A > tests/out01.sadf-g.tmp && diff -u tests/expected01.sadf-g tests/out01.sadf-g.tmp diff --git a/tests/01250 b/tests/01250 index a7302ba..639ec86 100644 --- a/tests/01250 +++ b/tests/01250 @@ -1 +1 @@ -LC_ALL=C ./sadf -H tests/data0.tmp > tests/out01.sadf-H.tmp && diff -u tests/expected01.sadf-H tests/out01.sadf-H.tmp +LC_ALL=C ./sadf -H tests/data0-1.tmp > tests/out01.sadf-H.tmp && diff -u tests/expected01.sadf-H tests/out01.sadf-H.tmp diff --git a/tests/01575 b/tests/01575 new file mode 100644 index 0000000..8d5faa7 --- /dev/null +++ b/tests/01575 @@ -0,0 +1 @@ +LC_ALL=C TZ=GMT ./sar -w -f tests/data-ssr.tmp > tests/out.sar-ssr.tmp && diff -u tests/expected.sar-ssr tests/out.sar-ssr.tmp diff --git a/tests/01577 b/tests/01577 new file mode 100644 index 0000000..10b6dbc --- /dev/null +++ b/tests/01577 @@ -0,0 +1,2 @@ +# Don't check output as sensors stats are system dependent +LC_ALL=C TZ=GMT ./sar -A -f tests/data-ssr.tmp >/dev/null diff --git a/tests/01580 b/tests/01580 new file mode 100644 index 0000000..31332e6 --- /dev/null +++ b/tests/01580 @@ -0,0 +1,6 @@ +. tests/variables +if [ "${TGLIB32}" = "yes" ]; then + LC_ALL=C TZ=GMT tests/32bits/sar32 -w -f tests/data-ssr.tmp > tests/out2.sar-ssr.tmp && diff -u tests/expected.sar-ssr tests/out2.sar-ssr.tmp +else + echo Skipped +fi diff --git a/tests/01585 b/tests/01585 new file mode 100644 index 0000000..0c4aed1 --- /dev/null +++ b/tests/01585 @@ -0,0 +1,7 @@ +. tests/variables +if [ "${TGLIB32}" = "yes" ]; then +# Don't check output as sensors stats are system dependent + LC_ALL=C TZ=GMT tests/32bits/sar32 -A -f tests/data-ssr.tmp >/dev/null +else + echo Skipped +fi diff --git a/tests/TLIST b/tests/TLIST index 2b276ac..6c1ac30 100644 --- a/tests/TLIST +++ b/tests/TLIST @@ -11,22 +11,50 @@ NOTES: 00016 ./tapestat -V >/dev/null 00017 ./cifsiostat -V >/dev/null -===== Creating data.tmp [.....RC] -00100 5 x TZ=GMT ./sadc --unix_time=XXXXXXXXX -S XALL,-A_PWR_FAN,-A_PWR_IN,-A_PWR_TEMP,-A_PWR_FREQ tests/data.tmp 1 1 >/dev/null -00110 TZ=GMT ./sadc --unix_time=XXXXXXXXX tests/data.tmp -00120 TZ=GMT ./sadc --unix_time=1555594749 -C "Testing sysstat!" tests/data.tmp +===== Files creation +----- Create data-new.tmp [.....RC] +00050 5 x TZ=GMT ./sadc --unix_time=XXXXXXXXX -S XALL,-A_PWR_FAN,-A_PWR_IN,-A_PWR_TEMP,-A_PWR_FREQ tests/data-new.tmp 1 1 >/dev/null +00052 TZ=GMT ./sadc --unix_time=XXXXXXXXX tests/data-new.tmp +00054 TZ=GMT ./sadc --unix_time=1555594749 -C "Testing sysstat!" tests/data-new.tmp -===== sar: Reading data.tmp -00130 LC_ALL=C TZ=GMT ./sar -C -u -P ALL -f tests/data.tmp > tests/out.sar-u.tmp -00131 LC_ALL=C TZ=GMT ./sar -bBdFHqSvwWy -I SUM -I ALL -m CPU -n ALL -r ALL -u ALL -P ALL -f tests/data.tmp > tests/out.sar-all.tmp +----- Create data.tmp by appending data to data-new.tmp [.....RCR..] +00055 TZ=GMT ./sadc --unix_time=1555595649 tests/data.tmp +00057 2 x TZ=GMT ./sadc --unix_time=XXXXXXXXX -S XALL tests/data.tmp 1 1 >/dev/null + +----- Create data0.tmp [R] with no data inside +00060 TZ=GMT ./sadc --unix_time=1555593609 -S A_NULL,A_PCSW tests/data0.tmp >/dev/null + +----- Create data0-1.tmp by appending data to data0.tmp [RR.] +00062 2 x TZ=GMT ./sadc --unix_time=xxxxxxxxx [ -S XALL ] tests/data0.tmp [ 1 1 ] >/dev/null + +----- Create data1.tmp [..R..] starting at root6 +00065 4 x TZ=GMT ./sadc --unix_time=xxxxxxx tests/data1.tmp 1 1 >/dev/null + +----- Create data2.tmp [..R..] starting at root1 +00068 4 x TZ=GMT ./sadc --unix_time=xxxxxxx tests/data2.tmp 1 1 >/dev/null + +----- Create datafile data-ssr.tmp [..] containing all statistics, including sensors ones +00070 2 x TZ=GMT ./sadc --unix_time=1555593609 -S XALL tests/data-ssr.tmp 1 1 >/dev/null + +----- Create data-cd.tmp [.....] spanning two consecutive days +00072 5 x TZ=GMT ./sadc --unix-time=xxxxxxxx -S A_NULL,A_CPU,A_PCSW tests/data-cd 1 1 + +----- Creating datax.tmp [RC....R..CR.RR..CC.] +00074 n x TZ=GMT ./sadc --unix_time=xxxxxxxxxx tests/datax.tmp (...) + +----- Creating a 32-bit datafile: tests/data32.tmp [RC..] +00080 4 x TZ=GMT tests/32bits/sadc32 -unix_time=xxxxxxxxx -S XALL,-A_PWR_FAN,-A_PWR_IN,-A_PWR_TEMP,-A_PWR_FREQ tests/data32.tmp [...] + +----- Creating 32-bit datafile data32-ssr.tmp [..] containing all statistics, including sensors ones +00090 2 x TZ=GMT tests/32bits/sadc32 --unix_time=1555593609 -S XALL tests/data32-ssr.tmp 1 1 >/dev/null + +===== sar: Reading data-new.tmp +00130 LC_ALL=C TZ=GMT ./sar -C -u -P ALL -f tests/data-new.tmp > tests/out.sar-u.tmp +00131 LC_ALL=C TZ=GMT ./sar -bBdFHqSvwWy -I SUM -I ALL -m CPU -n ALL -r ALL -u ALL -P ALL -f tests/data-new.tmp > tests/out.sar-all.tmp [Don't take into account sensors statistics which are not read from test root directory] -00132 LC_ALL=C TZ=GMT ./sar -A -I 2-5 -P 3 -f tests/data.tmp > tests/out3.sar-all.tmp +00132 LC_ALL=C TZ=GMT ./sar -A -I 2-5 -P 3 -f tests/data-new.tmp > tests/out3.sar-all.tmp [Check that -A doesn't necessarily imply -I ALL -P ALL] -===== Appending data to data.tmp [.....RCR..] -00140 TZ=GMT ./sadc --unix_time=1555595649 tests/data.tmp -00150 2 x TZ=GMT ./sadc --unix_time=XXXXXXXXX -S XALL tests/data.tmp 1 1 >/dev/null - ===== sar: Reading data.tmp 00160 LC_ALL=C TZ=GMT ./sar -C -u -P ALL -f tests/data.tmp > tests/out2.sar-u.tmp 00161 LC_ALL=C TZ=GMT ./sar -A -f tests/data.tmp > tests/out2.sar-all.tmp @@ -110,15 +138,15 @@ NOTES: ===== Reading datafile from another architecture 00700 LC_ALL=C TZ=GMT ./sar -C -A -f tests/data-ppc-11.7.2 > tests/out.data-ppc-11.7.2.tmp -00710 4 x TZ=GMT tests/32bits/sadc32 -unix_time=xxxxxxxxx -S XALL,-A_PWR_FAN,-A_PWR_IN,-A_PWR_TEMP,-A_PWR_FREQ tests/data32.tmp [...] - [Creating a 32-bit datafile: tests/data32.tmp [RC..]] -00712 LC_ALL=C TZ=GMT ./sar -C -A -f tests/data32.tmp > tests/out.sar32-A.tmp +00710 LC_ALL=C TZ=GMT ./sar -C -A -f tests/data32.tmp > tests/out.sar32-A.tmp [Read 32-bit datafile tests/data32.tmp using 64-bit sar. Assuming current arch is 64 bits] 00715 LC_ALL=C TZ=GMT tests/32bits/sar32 -C -A -f tests/data.tmp 1 2 > tests/out2.sar32-A.tmp [Read 64-bit datafile tests/data.tmp using 32-bit sar] +00720 LC_ALL=C TZ=GMT ./sar -w -f tests/data32-ssr.tmp > tests/out.sar32-ssr.tmp +00725 LC_ALL=C TZ=GMT ./sar -A -f tests/data32-ssr.tmp >/dev/null ===== 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 +00740 LC_ALL=C TZ=GMT ./sar -C -f tests/data-non-printable > tests/out.sar-non-printable.tmp ===== 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 @@ -164,13 +192,8 @@ NOTES: 00970 LC_ALL=C TZ=GMT ./sar -q ALL 1 1 > tests/out1.sar-qALL.tmp 00974 LC_ALL=C TZ=GMT ./sar -q PSI 1 1 2>&1 | grep "Requested activities not available" >/dev/null 00976 LC_ALL=C TZ=GMT ./sar -q PSI 1 1 2>&1 | grep "Inconsistent input data" >/dev/null && exit 1 || exit 0 -00980 4 x TZ=GMT ./sadc --unix_time=xxxxxxx tests/data1.tmp 1 1 >/dev/null -00982 LC_ALL=C TZ=GMT ./sar -f tests/data1.tmp -q ALL > tests/out2.sar-q.tmp - -===== Creating data0.tmp [R] and data1.tmp [..R..] with no data inside -01000 TZ=GMT ./sadc --unix_time=1555593609 -S A_NULL,A_PCSW tests/data0.tmp >/dev/null -01010 4 x TZ=GMT ./sadc --unix_time=xxxxxxx tests/data1.tmp 1 1 >/dev/null -01012 LC_ALL=C TZ=GMT ./sar -f tests/data1.tmp -q ALL > tests/out2.sar-qALL.tmp +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" ===== sar/sadf: Reading data0.tmp @@ -182,13 +205,11 @@ NOTES: 01145 LC_ALL=C ./sadf tests/data0.tmp 2>&1 | grep "Requested activities not available" >/dev/null 01150 LC_ALL=C ./sadf -g tests/data0.tmp -- -A > tests/out0.sadf-g.tmp -===== Append data to data0.tmp [RR.] then read its contents -01200 2 x TZ=GMT ./sadc --unix_time=xxxxxxxxx [ -S XALL ] tests/data0.tmp [ 1 1 ] >/dev/null -01210 LC_ALL=C TZ=GMT ./sar -A -f tests/data0.tmp > tests/out01.sar-A.tmp -01220 ./sadf -d tests/data0.tmp -- -A > tests/out01.sadf-d.tmp -01230 ./sadf -j tests/data0.tmp -- -A | $VER_JSON >/dev/null -01240 LC_ALL=C ./sadf -g tests/data0.tmp -- -A > tests/out01.sadf-g.tmp -01250 LC_ALL=C ./sadf -H tests/data0.tmp > tests/out01.sadf-H.tmp +01210 LC_ALL=C TZ=GMT ./sar -A -f tests/data0-1.tmp > tests/out01.sar-A.tmp +01220 ./sadf -d tests/data0-1.tmp -- -A > tests/out01.sadf-d.tmp +01230 ./sadf -j tests/data0-1.tmp -- -A | $VER_JSON >/dev/null +01240 LC_ALL=C ./sadf -g tests/data0-1.tmp -- -A > tests/out01.sadf-g.tmp +01250 LC_ALL=C ./sadf -H tests/data0-1.tmp > tests/out01.sadf-H.tmp ===== Playing with standard activity datafiles 01300 echo foo >tests/sa01 ; ./sadc 1 1 - 2>&1 | grep "Invalid system activity" >/dev/null @@ -237,6 +258,10 @@ NOTES: 01550 LC_ALL=C TZ=GMT ./sadf -x tests/data-11.6.5.tmp -- -m FAN,IN,TEMP > tests/out.data-11.6.5-sadf-x.tmp 01557 cat tests/out.data-11.6.5-sadf-x.tmp | $VER_XML --schema xml/sysstat.xsd - >/dev/null; 01559 cat tests/out.data-11.6.5-sadf-x.tmp | $VER_XML --dtdvalid xml/sysstat-*.dtd - >/dev/null; +01575 LC_ALL=C TZ=GMT ./sar -w -f tests/data-ssr.tmp > tests/out.sar-ssr.tmp +01577 LC_ALL=C TZ=GMT ./sar -A -f tests/data-ssr.tmp >/dev/null +01580 LC_ALL=C TZ=GMT tests/32bits/sar32 -w -f tests/data-ssr.tmp > tests/out2.sar-ssr.tmp +01585 LC_ALL=C TZ=GMT tests/32bits/sar32 -A -f tests/data-ssr.tmp >/dev/null ===== Specific tests for A_PWR_FREQ statistics 01600 TZ=GMT ./sadc --unix_time=1555593609 -S A_NULL,A_PWR_FREQ tests/data-wghfreq.tmp 1 3 >/dev/null @@ -257,14 +282,10 @@ NOTES: [CPU#8 - Last in list - online then offline] 01720 LC_ALL=C TZ=GMT ./sar -P ALL -u -n SOFT 2 3 > tests/out.sar-cpu8off.tmp [CPU#8 - Last in list - already offline] -01750 5 x TZ=GMT ./sadc --unix-time=xxxxxxxx -S A_NULL,A_CPU,A_PCSW tests/data-cd 1 1 - [Create data-cd.tmp [.....] spanning two consecutive days] 01755 LC_ALL=C TZ=GMT ./sar -uw -f tests/data-cd -s 23:59:58 -e 00:00:00 > tests/out.sar-cd.tmp [Testing options -s/-e on a file contents spanning two consecutive days] [Work only with very simple file contents (no LINUX RESTART or COMMENT records)] [Note: "11:00:00 PM" is "23:00:00" - "12:00:00 AM" is "00:00:00"] -01800 n x TZ=GMT ./sadc --unix_time=xxxxxxxxxx tests/datax.tmp (...) - [Creating datax.tmp [RC....R..CR.RR..CC.] ] 01810 LC_ALL=C TZ=GMT ./sar -C -P ALL -uw -n DEV -F -I 2,3 -f tests/datax.tmp > tests/out.sar-ext-hl.tmp ===== iostat tests (basic output) diff --git a/tests/data-new.out b/tests/data-new.out new file mode 120000 index 0000000..9b3c2b8 --- /dev/null +++ b/tests/data-new.out @@ -0,0 +1 @@ +expected.sar-all \ No newline at end of file diff --git a/tests/data.out b/tests/data.out new file mode 120000 index 0000000..0dfca24 --- /dev/null +++ b/tests/data.out @@ -0,0 +1 @@ +expected2.sar-all \ No newline at end of file diff --git a/tests/data0-1.out b/tests/data0-1.out new file mode 120000 index 0000000..bc972a8 --- /dev/null +++ b/tests/data0-1.out @@ -0,0 +1 @@ +expected01.sar-A \ No newline at end of file diff --git a/tests/data0.out b/tests/data0.out new file mode 120000 index 0000000..cbd9be3 --- /dev/null +++ b/tests/data0.out @@ -0,0 +1 @@ +expected0.sar-A \ No newline at end of file diff --git a/tests/data1.out b/tests/data1.out new file mode 120000 index 0000000..f51c7b9 --- /dev/null +++ b/tests/data1.out @@ -0,0 +1 @@ +expected2.sar-qALL \ No newline at end of file diff --git a/tests/data2.out b/tests/data2.out new file mode 120000 index 0000000..b2490ce --- /dev/null +++ b/tests/data2.out @@ -0,0 +1 @@ +expected2.sar-q \ No newline at end of file diff --git a/tests/data32.out b/tests/data32.out new file mode 120000 index 0000000..4fcaac5 --- /dev/null +++ b/tests/data32.out @@ -0,0 +1 @@ +expected.sar32-A \ No newline at end of file diff --git a/tests/datax.out b/tests/datax.out new file mode 120000 index 0000000..5de9e02 --- /dev/null +++ b/tests/datax.out @@ -0,0 +1 @@ +expected.sar-ext-hl \ No newline at end of file diff --git a/tests/expected.sar-ssr b/tests/expected.sar-ssr new file mode 100644 index 0000000..1691406 --- /dev/null +++ b/tests/expected.sar-ssr @@ -0,0 +1,5 @@ +Linux 1.2.3-TEST (SYSSTAT.TEST) 04/18/19 _x86_64_ (9 CPU) + +13:20:09 proc/s cswch/s +13:20:19 3.56 68409.30 +Average: 3.56 68409.30 diff --git a/tests/expected.sar32-ssr b/tests/expected.sar32-ssr new file mode 100644 index 0000000..1691406 --- /dev/null +++ b/tests/expected.sar32-ssr @@ -0,0 +1,5 @@ +Linux 1.2.3-TEST (SYSSTAT.TEST) 04/18/19 _x86_64_ (9 CPU) + +13:20:09 proc/s cswch/s +13:20:19 3.56 68409.30 +Average: 3.56 68409.30 diff --git a/tests/expected01.sadf-H b/tests/expected01.sadf-H index 271b492..3841d55 100644 --- a/tests/expected01.sadf-H +++ b/tests/expected01.sadf-H @@ -1,4 +1,4 @@ -System activity data file: tests/data0.tmp (0x2175) +System activity data file: tests/data0-1.tmp (0x2175) File created by sar/sadc from sysstat version 99.9.9 Genuine sa datafile: yes (0) Host: Linux 1.2.3-TEST (SYSSTAT.TEST) 04/18/19 _x86_64_ (9 CPU)