--- /dev/null
+LC_ALL=C ./sadf -d tests/data.tmp -- -qu > tests/out.sadf-d-qu.tmp
--- /dev/null
+diff -u tests/out.sadf-d-qu.tmp tests/expected.sadf-d-qu
--- /dev/null
+rm -f tests/root
+ln -s root1 tests/root
+LC_ALL=C TZ=GMT ./sar -qu 0 > tests/out.sar-qu.tmp
--- /dev/null
+diff -u tests/out.sar-qu.tmp tests/expected.sar-qu
--- /dev/null
+rm -f tests/root
+ln -s root1 tests/root
+LC_ALL=C TZ=GMT ./sar -q -u 0 > tests/out1.sar-qu.tmp
--- /dev/null
+diff -u tests/out1.sar-qu.tmp tests/expected.sar-qu
--- /dev/null
+rm -f tests/root
+ln -s root1 tests/root
+LC_ALL=C TZ=GMT ./sar -q IO 0 > tests/out.sar-qIO.tmp
--- /dev/null
+diff -u tests/out.sar-qIO.tmp tests/expected.sar-qIO
--- /dev/null
+rm -f tests/root
+ln -s root1 tests/root
+LC_ALL=C TZ=GMT ./sar -q MEM,IO 0 > tests/out.sar-qMEMIO.tmp
--- /dev/null
+diff -u tests/out.sar-qMEMIO.tmp tests/expected.sar-qMEMIO
--- /dev/null
+rm -f tests/root
+ln -s root1 tests/root
+LC_ALL=C TZ=GMT ./sar -q PSI 0 > tests/out.sar-qPSI.tmp
--- /dev/null
+diff -u tests/out.sar-qPSI.tmp tests/expected.sar-qPSI
--- /dev/null
+rm -f tests/root
+ln -s root1 tests/root
+LC_ALL=C TZ=GMT ./sar -q ALL 0 > tests/out.sar-qALL.tmp
--- /dev/null
+diff -u tests/out.sar-qALL.tmp tests/expected.sar-qALL
--- /dev/null
+LC_ALL=C ./sar -q FOO 2>&1 | grep "Usage:" >/dev/null
00501 diff -u tests/out.sadf-p.tmp tests/expected.sadf-p
00510 LC_ALL=C ./sadf -d tests/data.tmp -C -- -A > tests/out.sadf-d.tmp
00511 diff -u tests/out.sadf-d.tmp tests/expected.sadf-d
+00515 LC_ALL=C ./sadf -d tests/data.tmp -- -qu > tests/out.sadf-d-qu.tmp
+00516 diff -u tests/out.sadf-d-qu.tmp tests/expected.sadf-d-qu
00520 LC_ALL=C ./sadf -x tests/data.tmp -C -- -A > tests/out.sadf-x.tmp
00521 diff -u tests/out.sadf-x.tmp tests/expected.sadf-x
00530 LC_ALL=C ./sadf -j tests/data.tmp -C -- -A > tests/out.sadf-j.tmp
00932 diff -u tests/out.sar-0.tmp tests/expected.sar-0
00940 LC_ALL=C TZ=GMT ./sar 1 2 > tests/out.sar.tmp
00942 diff -u tests/out.sar.tmp tests/expected.sar1
+00950 LC_ALL=C TZ=GMT ./sar -qu 0 > tests/out.sar-qu.tmp
+00952 diff -u tests/out.sar-qu.tmp tests/expected.sar-qu
+00954 LC_ALL=C TZ=GMT ./sar -q -u 0 > tests/out1.sar-qu.tmp
+00956 diff -u tests/out1.sar-qu.tmp tests/expected.sar-qu
+00958 LC_ALL=C TZ=GMT ./sar -q IO 0 > tests/out.sar-qIO.tmp
+00959 diff -u tests/out.sar-qIO.tmp tests/expected.sar-qIO
+00960 LC_ALL=C TZ=GMT ./sar -q MEM,IO 0 > tests/out.sar-qMEMIO.tmp
+00962 diff -u tests/out.sar-qMEMIO.tmp tests/expected.sar-qMEMIO
+00964 LC_ALL=C TZ=GMT ./sar -q PSI 0 > tests/out.sar-qPSI.tmp
+00966 diff -u tests/out.sar-qPSI.tmp tests/expected.sar-qPSI
+00968 LC_ALL=C TZ=GMT ./sar -q ALL 0 > tests/out.sar-qALL.tmp
+00969 diff -u tests/out.sar-qALL.tmp tests/expected.sar-qALL
===== Creating data0.tmp with no data inside
01000 TZ=GMT ./sadc --unix_time=1555593609 -S A_NULL,A_PCSW tests/data0.tmp >/dev/null
01430 LC_ALL=C ./sar -o foo 2>&1 | grep "Usage:" >/dev/null
01440 LC_ALL=C TZ=GMT ./sar --unix_time=123456789 2>&1 | grep "Please check" >/dev/null
01450 LC_ALL=C TZ=GMT ./sar -f tests/data-9.1.6 2>&1 | grep "cannot read the format of this file" >/dev/null
+01460 LC_ALL=C ./sar -q FOO 2>&1 | grep "Usage:" >/dev/null
===== Specific tests for sensors statistics (basic sensor output already tested using data-11.6.5 conversion)
01500 LC_ALL=C TZ=GMT ./sadf -d tests/data-11.6.5.tmp -- -m FAN,IN,TEMP > tests/out.data-11.6.5-sadf-d.tmp
--- /dev/null
+# hostname;interval;timestamp;CPU;%user;%nice;%system;%iowait;%steal;%idle
+SYSSTAT.TEST;31;2019-04-18 13:20:19 UTC;-1;2.15;12.50;2.36;0.12;0.00;82.88
+SYSSTAT.TEST;31;2019-04-18 13:20:29 UTC;-1;2.28;0.00;1.93;0.50;0.00;95.29
+SYSSTAT.TEST;39;2019-04-18 13:20:39 UTC;-1;2.66;23.20;2.27;0.16;0.00;71.71
+SYSSTAT.TEST;22;2019-04-18 13:20:49 UTC;-1;6.53;9.63;4.42;0.54;0.00;78.89
+# hostname;interval;timestamp;runq-sz;plist-sz;ldavg-1;ldavg-5;ldavg-15;blocked
+SYSSTAT.TEST;31;2019-04-18 13:20:19 UTC;3;956;3.16;3.24;3.43;0
+SYSSTAT.TEST;31;2019-04-18 13:20:29 UTC;3;956;3.16;3.24;3.43;0
+SYSSTAT.TEST;39;2019-04-18 13:20:39 UTC;3;956;3.16;3.24;3.43;0
+SYSSTAT.TEST;22;2019-04-18 13:20:49 UTC;3;956;3.16;3.24;3.43;0
+SYSSTAT.TEST;-1;2019-04-18 13:37:29 UTC;LINUX-RESTART (8 CPU)
+SYSSTAT.TEST;-1;2019-04-18 13:54:09 UTC;LINUX-RESTART (10 CPU)
+# hostname;interval;timestamp;CPU;%user;%nice;%system;%iowait;%steal;%idle
+SYSSTAT.TEST;31;2019-04-18 13:54:35 UTC;-1;2.47;17.21;3.39;0.77;0.00;76.16
+# hostname;interval;timestamp;runq-sz;plist-sz;ldavg-1;ldavg-5;ldavg-15;blocked
+SYSSTAT.TEST;31;2019-04-18 13:54:35 UTC;3;956;3.16;3.24;3.43;0
--- /dev/null
+Linux 1.2.3-TEST (SYSSTAT.TEST) 01/01/70 _x86_64_ (8 CPU)
+
+00:00:00 runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15 blocked
+00:00:00 3 956 3.16 3.24 3.43 0
+
+00:00:00 %scpu-10 %scpu-60 %scpu-300 %scpu
+00:00:00 0.00 0.00 0.00 0.02
+
+00:00:00 %sio-10 %sio-60 %sio-300 %sio %fio-10 %fio-60 %fio-300 %fio
+00:00:00 0.45 0.34 0.20 1.34 0.45 0.33 0.20 1.29
+
+00:00:00 %smem-10 %smem-60 %smem-300 %smem %fmem-10 %fmem-60 %fmem-300 %fmem
+00:00:00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
--- /dev/null
+Linux 1.2.3-TEST (SYSSTAT.TEST) 01/01/70 _x86_64_ (8 CPU)
+
+00:00:00 %sio-10 %sio-60 %sio-300 %sio %fio-10 %fio-60 %fio-300 %fio
+00:00:00 0.45 0.34 0.20 1.34 0.45 0.33 0.20 1.29
--- /dev/null
+Linux 1.2.3-TEST (SYSSTAT.TEST) 01/01/70 _x86_64_ (8 CPU)
+
+00:00:00 %sio-10 %sio-60 %sio-300 %sio %fio-10 %fio-60 %fio-300 %fio
+00:00:00 0.45 0.34 0.20 1.34 0.45 0.33 0.20 1.29
+
+00:00:00 %smem-10 %smem-60 %smem-300 %smem %fmem-10 %fmem-60 %fmem-300 %fmem
+00:00:00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
--- /dev/null
+Linux 1.2.3-TEST (SYSSTAT.TEST) 01/01/70 _x86_64_ (8 CPU)
+
+00:00:00 %scpu-10 %scpu-60 %scpu-300 %scpu
+00:00:00 0.00 0.00 0.00 0.02
+
+00:00:00 %sio-10 %sio-60 %sio-300 %sio %fio-10 %fio-60 %fio-300 %fio
+00:00:00 0.45 0.34 0.20 1.34 0.45 0.33 0.20 1.29
+
+00:00:00 %smem-10 %smem-60 %smem-300 %smem %fmem-10 %fmem-60 %fmem-300 %fmem
+00:00:00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
--- /dev/null
+Linux 1.2.3-TEST (SYSSTAT.TEST) 01/01/70 _x86_64_ (8 CPU)
+
+00:00:00 CPU %user %nice %system %iowait %steal %idle
+00:00:00 all 1.65 44.90 1.84 1.01 0.00 50.60
+
+00:00:00 runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15 blocked
+00:00:00 3 956 3.16 3.24 3.43 0