NOTES:
	* The interval of time is calculated using ./proc/uptime files, not the value given on the command line.

=====
00010	./sar -V >/dev/null
00011	./iostat -V >/dev/null
00012	./mpstat -V >/dev/null
00013	./sadc -V >/dev/null
00014	./sadf -V >/dev/null
00015	./pidstat -V >/dev/null
00016	./tapestat -V >/dev/null
00017	./cifsiostat -V >/dev/null

=====	Creating data.tmp
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

=====	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
	[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
	[Check that -A doesn't necessarily imply -I ALL -P ALL]
00134	diff -u tests/out.u.tmp tests/expected.sar-u
00136	diff -u tests/out.sar-all.tmp tests/expected.sar-all
00137	diff -u tests/out3.sar-all.tmp tests/expected3.sar-all

=====	Appending data to data.tmp
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
00164	diff -u tests/out2.sar-u.tmp tests/expected2.sar-u
00166	diff -u tests/out2.sar-all.tmp tests/expected2.sar-all

=====	sar: Playing with environment variables
00180	LC_ALL=C TZ=GMT S_TIME_FORMAT=ISO S_COLORS= ./sar -C -u --getenv -f tests/data.tmp > tests/out.sar-ISO.tmp
00182	diff -u tests/out.sar-ISO.tmp tests/expected.sar-ISO
00184	LC_ALL=C TZ=GMT S_TIME_FORMAT=ISO S_COLORS=never ./sar -C -u --getenv -f tests/data.tmp > tests/out.sar-never.tmp
00186	diff -u tests/out.sar-never.tmp tests/expected.sar-autonever
00188	LC_ALL=C TZ=GMT S_TIME_FORMAT=ISO S_COLORS=auto ./sar -C -u --getenv -f tests/data.tmp > tests/out.sar-auto.tmp
00189	diff -u tests/out.sar-auto.tmp tests/expected.sar-autonever
00190	LC_ALL=C TZ=GMT S_TIME_FORMAT= S_COLORS=always S_COLORS_SGR="C=33;22:H=31;1:I=32;22:M=35;1:N=34;1:R=31;22:Z=36;22" ./sar -C -u --getenv -f tests/data.tmp > tests/out.sar-always.tmp
00192	diff -u tests/out.sar-always.tmp tests/expected.sar-always

=====	sar: Playing with sa1 and sa2 shell scripts
00200	./sa1 --boot; ./sa1 --unix_time=1555593629 1 1; ./sa1 --unix_time=1555593649 1 1
00205	LC_ALL=C TZ=GMT ./sar -f tests/sa18 > tests/out.sa1.tmp
00208	diff -u tests/out.sa1.tmp tests/expected.sa1
00220	LC_ALL=C TZ=GMT ./sa2 -A && mv tests/sar${DATE} tests/out.sa2.tmp && rm -f tests/sa${DATE}
00225	diff -u tests/out.sa2.tmp tests/expected.sa2

=====	Checking JSON output validity
00300	./sadf -j tests/data.tmp -C -- -A | $VER_JSON >/dev/null && ./sadf -j tests/data.tmp | $VER_JSON >/dev/null && ./sadf -t -j tests/data.tmp | $VER_JSON >/dev/null
00305	./sadf -Hj tests/data.tmp -C | $VER_JSON >/dev/null
00310	./mpstat -A -o JSON | $VER_JSON >/dev/null
00320	./iostat -t -p ALL -o JSON | $VER_JSON >/dev/null
00330	./mpstat -o JSON 1 10 | $VER_JSON >/dev/null
	[Simulate a Ctrl/C within mpstat]
00335	./mpstat 2 3 -o JSON | $VER_JSON >/dev/null
00336	./mpstat -A 1 3 -o JSON | $VER_JSON >/dev/null
00340	./iostat -p ALL -o JSON 1 10 | $VER_JSON >/dev/null
	[Simulate a Ctrl/C within iostat]
00345	./iostat -y 1 3 -o JSON ALL -p ALL -xt | $VER_JSON >/dev/null
00346	./iostat 1 3 -o JSON | $VER_JSON >/dev/null
00347	./iostat -xs 1 3 -o JSON ALL -p ALL | $VER_JSON >/dev/null
00350	./iostat -o JSON -g total /dev/sda1 sda3 -g foo 1 3 | $VER_JSON >/dev/null;

=====	Checking XML output validity
00400	export LC_ALL=C ; ./sadf -x tests/data.tmp -C -- -A | $VER_XML --schema xml/sysstat.xsd - >/dev/null && ./sadf -x tests/data.tmp | $VER_XML --schema xml/sysstat.xsd - >/dev/null && ./sadf -T -x tests/data.tmp | $VER_XML --schema xml/sysstat.xsd - >/dev/null
00405	export LC_ALL=C ; ./sadf -Hx tests/data.tmp -C | $VER_XML --schema xml/sysstat.xsd - >/dev/null
00410	export LC_ALL=C ; ./sadf -x tests/data.tmp -C -- -A | $VER_XML --dtdvalid xml/sysstat-*.dtd - >/dev/null && ./sadf -x tests/data.tmp | $VER_XML --dtdvalid xml/sysstat-*.dtd - >/dev/null && ./sadf -t -x tests/data.tmp | $VER_XML --dtdvalid xml/sysstat-*.dtd - >/dev/null
00415	export LC_ALL=C ; ./sadf -Hx tests/data.tmp -C | $VER_XML --dtdvalid xml/sysstat-*.dtd - >/dev/null
00420	export LC_ALL=C ; cat tests/data-12.0.1.xml | $VER_XML --schema xml/sysstat.xsd - >/dev/null
00430	export LC_ALL=C ; cat tests/data-12.0.1.xml | $VER_XML --dtdvalid xml/sysstat-*.dtd - >/dev/null

=====	Checking sadf output
00500	LC_ALL=C ./sadf -p tests/data.tmp -C -- -A > tests/out.sadf-p.tmp
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
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
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
00551	diff -u tests/out2.sadf-g.tmp tests/expected2.sadf-g
00555	LC_ALL=C TZ=GMT S_COLORS_PALETTE="0=000000:1=1a1aff:2=1affb2:3=b21aff:4=1ab2ff:5=ff1a1a:6=ffb31a:7=b2ff1a:8=efefef:9=000000:A=1a1aff:B=1affb2:C=b21aff:D=1ab2ff:E=ff1a1a:F=ffb31a:G=cc3300:H=000000:I=000000:K=ffffff:L=000000:T=000000:W=000000:X=000000" ./sadf -g --getenv -O customcol tests/data.tmp -C > tests/out.sadf-g-cc.tmp
00557	diff -u tests/out.sadf-g-cc.tmp tests/expected.sadf-g-cc
00560	LC_ALL=C ./sadf -H tests/data.tmp > tests/out.sadf-H.tmp
00561	diff -u tests/out.sadf-H.tmp tests/expected.sadf-H
00570	./sadf -r -O debug tests/data.tmp -C -- -A > tests/out.sadf-r.tmp
00571	diff -u tests/out.sadf-r.tmp tests/expected.sadf-r
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
00582	diff -u tests/out.sadf-se.tmp tests/expected.sadf-se
00590	LC_ALL=C ./sadf -l -O pcparchive=tests/pcpar tests/data.tmp -C -- -A

=====	Checking sadf conversion
00600	./sadf -c tests/data-9.1.6 > tests/data-9.1.6.tmp
00605	LC_ALL=C TZ=GMT ./sar -C -A -f tests/data-9.1.6.tmp > tests/out.data-9.1.6.tmp
00607	diff -u tests/out.data-9.1.6.tmp tests/expected.data-9.1.6
00610	./sadf -c tests/data-10.3.1 > tests/data-10.3.1.tmp
00615	LC_ALL=C TZ=GMT ./sar -C -A -f tests/data-10.3.1.tmp > tests/out.data-10.3.1.tmp
00617	diff -u tests/out.data-10.3.1.tmp tests/expected.data-10.3.1
00620	./sadf -c tests/data-11.6.5 > tests/data-11.6.5.tmp
00625	LC_ALL=C TZ=GMT ./sar -C -A -f tests/data-11.6.5.tmp > tests/out.data-11.6.5.tmp
00627	diff -u tests/out.data-11.6.5.tmp tests/expected.data-11.6.5	
00650	LC_ALL=C TZ=GMT ./sar -AC -f tests/data-12.0.0 > tests/out.data-12.0.0.tmp
00655	diff -u tests/out.data-12.0.0.tmp tests/expected.data-12.0.0

=====	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
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
	[There may be some small differences in ext disks stats between initial and current version
	outputs, because initial version doesn't take into account discard fields]

=====	Reading datafile with extra structures
00770	LC_ALL=C TZ=GMT ./sar -A -f tests/data-extra-12.1.7 > tests/out.data-extra-12.1.7.tmp
00772	diff -u tests/out.data-extra-12.1.7.tmp tests/expected.data-extra-12.1.7

=====	Reading datafiles with unknown activity type or format
00780	LC_ALL=C TZ=GMT ./sar -P ALL -f tests/data-ukwn > tests/out.sar-data-ukwn.tmp
00781	diff -u tests/out.sar-data-ukwn.tmp tests/expected.sar-data-ukwn
00784	LC_ALL=C TZ=GMT ./sar -w -f tests/data-ukwn > tests/out2.sar-data-ukwn.tmp
00785	diff -u tests/out2.sar-data-ukwn.tmp tests/expected2.sar-data-ukwn
00787	LC_ALL=C ./sadf -H tests/data-ukwn > tests/out.sadf-data-ukwn.tmp
00788	diff -u tests/out.sadf-data-ukwn.tmp tests/expected.sadf-data-ukwn
00790	LC_ALL=C TZ=GMT ./sar -A -f tests/data-ukwn0 > tests/out.sar-data-ukwn0.tmp
00791	diff -u tests/out.sar-data-ukwn0.tmp tests/expected.sar-data-ukwn0
00795	LC_ALL=C ./sadf -H tests/data-ukwn0 > tests/out.sadf-data-ukwn0.tmp
00796	diff -u tests/out.sadf-data-ukwn0.tmp tests/expected.sadf-data-ukwn0

=====	Testing sar's options
00800	LC_ALL=C TZ=GMT ./sar --iface=lo,enp6s0,eth0 -n DEV,EDEV -f tests/data.tmp > tests/out.sar-iface.tmp
00802	diff -u tests/out.sar-iface.tmp tests/expected.sar-iface
00810	LC_ALL=C TZ=GMT ./sar --dev=sda -dp -f tests/data.tmp > tests/out.sar-dev.tmp
00812	diff -u tests/out.sar-dev.tmp tests/expected.sar-dev
00820	LC_ALL=C TZ=GMT ./sar --fs=/dev/sda6,/dev/foo -F -f tests/data.tmp > tests/out.sar-fs.tmp
00822	diff -u tests/out.sar-fs.tmp tests/expected.sar-fs
00830	LC_ALL=C TZ=GMT ./sar --dec=0 -A -f tests/data.tmp > tests/out.sar-dec.tmp
00832	diff -u tests/out.sar-dec.tmp tests/expected.sar-dec
00840	LC_ALL=C TZ=GMT ./sar --human -A -f tests/data.tmp > tests/out.sar-human.tmp
00842	diff -u tests/out.sar-human.tmp tests/expected.sar-human
00850	LC_ALL=C TZ=GMT ./sar -s 13:20:20 -e 13:20:40 -f tests/data.tmp > tests/out.sar-se.tmp
00852	diff -u tests/out.sar-se.tmp tests/expected.sar-se
00860	LC_ALL=C TZ=GMT ./sar -i 60 -uw -P ALL -f tests/data.tmp > tests/out.sar-i.tmp
00862	diff -u tests/out.sar-i.tmp tests/expected.sar-i
	[WARNING: /proc/uptime files are not consistent with unix_time values used. Don't trust timestamps!]
00870	LC_ALL=C TZ=GMT ./sar 60 -uw -P ALL -f tests/data.tmp > tests/out2.sar-i.tmp
00872	diff -u tests/out2.sar-i.tmp tests/expected.sar-i
00880	LC_ALL=C TZ=GMT ./sar 60 2 -f tests/data.tmp > tests/out3.sar-i.tmp
00882	diff -u tests/out3.sar-i.tmp tests/expected3.sar-i
00900	LC_ALL=C TZ=GMT ./sar -dh -j UUID -f tests/data.tmp > tests/out.sar-jUUID.tmp
00902	diff -u tests/out.sar-jUUID.tmp tests/expected.sar-jUUID
00904	LC_ALL=C TZ=GMT ./sar -dh -j ID -f tests/data.tmp > tests/out.sar-jID.tmp
	[Done on root4. IDs are determined at run-time using ./dev/disk/by-id contents]
00905	diff -u tests/out.sar-jID.tmp tests/expected.sar-jID
00906	LC_ALL=C TZ=GMT ./sar -dh -j SID -f tests/data.tmp > tests/out.sar-jSID.tmp
00907	diff -u tests/out.sar-jSID.tmp tests/expected.sar-jSID
00910	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"]
00912	diff -u tests/out.sar-cd.tmp tests/expected.sar-cd
00920	LC_ALL=C TZ=GMT ./sar -f tests/data.tmp -e 13:30 -z -n DEV -dp > tests/out.sar-z.tmp
00922	diff -u tests/out.sar-z.tmp tests/expected.sar-z
00930	LC_ALL=C TZ=GMT ./sar -ur 0 > tests/out.sar-0.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

=====	Creating data0.tmp with no data inside
01000	TZ=GMT ./sadc --unix_time=1555593609 -S A_NULL,A_PCSW tests/data0.tmp >/dev/null

=====	sar/sadf: Reading data0.tmp
01100	LC_ALL=C TZ=GMT ./sar -A -f tests/data0.tmp > tests/out0.sar-A.tmp
01102	diff -u tests/out0.sar-A.tmp tests/expected0.sar-A
01110	./sadf tests/data0.tmp -- -A > tests/out0.sadf.tmp
01112	diff -u tests/out0.sadf.tmp tests/expected0.sadf
01120	./sadf -x tests/data0.tmp -- -A > tests/out0.sadf-x.tmp
01122	diff -u tests/out0.sadf-x.tmp tests/expected0.sadf-x
01130	./sadf -j tests/data0.tmp -- -A | $VER_JSON >/dev/null
01140	LC_ALL=C TZ=GMT ./sar -r -f tests/data0.tmp 2>&1 | grep "Requested activities not available" >/dev/null
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
01152	diff -u tests/out0.sadf-g.tmp tests/expected0.sadf-g

=====	Append data to data0.tmp 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
01212	diff -u tests/out01.sar-A.tmp tests/expected01.sar-A
01220	./sadf -d tests/data0.tmp -- -A > tests/out01.sadf-d.tmp
01222	diff -u tests/out01.sadf-d.tmp tests/expected01.sadf-d
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
01242	diff -u tests/out01.sadf-g.tmp tests/expected01.sadf-g
01250	LC_ALL=C ./sadf -H tests/data0.tmp > tests/out01.sadf-H.tmp
01252	diff -u tests/out01.sadf-H.tmp tests/expected01.sadf-H

=====	Playing with standard activity datafiles
01300	echo foo >tests/sa01 ; ./sadc 1 1 - 2>&1 | grep "Invalid system activity" >/dev/null
01305	LC_ALL=C TZ=GMT ./sadc -F 1 1 -
01310	LC_ALL=C TZ=GMT ./sar -f tests/sa01 > tests/out3.sar-u.tmp
01312	diff -u tests/out3.sar-u.tmp tests/expected3.sar-u
01314	LC_ALL=C TZ=GMT ./sar > tests/out31.sar-u.tmp
01316	diff -u tests/out31.sar-u.tmp tests/expected3.sar-u
01318	LC_ALL=C TZ=GMT ./sar -f tests > tests/out34.sar-u.tmp
01319	diff -u tests/out34.sar-u.tmp tests/expected3.sar-u
01320	LC_ALL=C TZ=GMT ./sadc -D -
01330	LC_ALL=C TZ=GMT ./sar -f tests/sa19700101 > tests/out32.sar-u.tmp
01332	diff -u tests/out32.sar-u.tmp tests/expected32.sar-u
01335	LC_ALL=C TZ=GMT ./sar > tests/out33.sar-u.tmp
01337	diff -u tests/out33.sar-u.tmp tests/expected32.sar-u
01340	./sadf > tests/out3.sadf.tmp
01342	diff -u tests/out3.sadf.tmp tests/expected3.sadf
01350	TZ=GMT ./sadc --unix_time=1556755199 - 1 3
	[Create sa01 and sa02 - Timestamp can be obtained with: date +%s --date='Wed May  1 23:59:59 CEST 2019']
01352	LC_ALL=C TZ=GMT ./sar -f tests/sa01 > tests/out33.sar-u.tmp; LC_ALL=C TZ=GMT ./sar -f tests/sa02 >> tests/out33.sar-u.tmp
01355	diff -u tests/out33.sar-u.tmp tests/expected33.sar-u
01360	LC_ALL=C TZ=GMT ./sar --unix_time=1556755203 -1 > tests/out.sar-1.tmp
	[Go to day 02 and try to read sa01]
01362	diff -u tests/out.sar-1.tmp tests/expected.sar-1
01370	LC_ALL=C TZ=GMT ./sar --unix_time=1556755203 -D -o 1 2 > /dev/null
	[Create datafile sa20190502]
01372	LC_ALL=C TZ=GMT ./sar -f tests/sa20190502 > tests/out.sar-D.tmp
01375	diff -u tests/out.sar-D.tmp tests/expected.sar-D
01380	LC_ALL=C TZ=GMT ./sar --unix_time=1556755203 -o tests/sa-sigint.tmp 1 10 > /dev/null
	[Create binary datafile sa-sigint.tmp. Stop with a simulated Ctrl/C]
01382	LC_ALL=C TZ=GMT ./sar -f tests/sa-sigint.tmp -m CPU > tests/out.sar-sigint.tmp
01385	diff -u tests/out.sar-sigint.tmp tests/expected.sar-sigint

=====	Testing error cases
01400	LC_ALL=C TZ=GMT ./sar -f tests/data-trunc 2>&1 | grep "End of system activity file unexpected" >/dev/null
01405	LC_ALL=C TZ=GMT ./sadf -g tests/data-trunc -- -A > tests/out.sadf-g-trunc.tmp 2>/dev/null
	[Check that sadf -g terminates properly on truncated input file]
01406	diff -u tests/out.sadf-g-trunc.tmp tests/expected.sadf-g-trunc
01410	LC_ALL=C ./sar 0 0 2>&1 | grep "Usage:" >/dev/null
01415	LC_ALL=C ./sar 0 2 2>&1 | grep "Usage:" >/dev/null
01420	LC_ALL=C ./sar 2 0 2>&1 | grep "Usage:" >/dev/null
01425	LC_ALL=C ./sar 2 2 2 2>&1 | grep "Usage:" >/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

=====	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
01505	diff -u tests/out.data-11.6.5-sadf-d.tmp tests/expected.data-11.6.5-sadf-d
01510	LC_ALL=C TZ=GMT ./sadf -p tests/data-11.6.5.tmp -- -m FAN,IN,TEMP > tests/out.data-11.6.5-sadf-p.tmp
01515	diff -u tests/out.data-11.6.5-sadf-p.tmp tests/expected.data-11.6.5-sadf-p
01520	LC_ALL=C TZ=GMT ./sadf -r tests/data-11.6.5.tmp -- -m FAN,IN,TEMP > tests/out.data-11.6.5-sadf-r.tmp
01525	diff -u tests/out.data-11.6.5-sadf-r.tmp tests/expected.data-11.6.5-sadf-r
01530	LC_ALL=C TZ=GMT ./sadf -g tests/data-11.6.5.tmp -- -m FAN,IN,TEMP > tests/out.data-11.6.5-sadf-g.tmp
01535	diff -u tests/out.data-11.6.5-sadf-g.tmp tests/expected.data-11.6.5-sadf-g
01540	LC_ALL=C TZ=GMT ./sadf -j tests/data-11.6.5.tmp -- -m FAN,IN,TEMP > tests/out.data-11.6.5-sadf-j.tmp
01545	diff -u tests/out.data-11.6.5-sadf-j.tmp tests/expected.data-11.6.5-sadf-j
01547	cat tests/out.data-11.6.5-sadf-j.tmp | $VER_JSON >/dev/null;
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
01555	diff -u tests/out.data-11.6.5-sadf-x.tmp tests/expected.data-11.6.5-sadf-x
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;

=====	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
01610	LC_ALL=C TZ=GMT ./sar -f tests/data-wghfreq.tmp -m FREQ -P ALL > tests/out.sar-m-freq.tmp
01615	diff -u tests/out.sar-m-freq.tmp tests/expected.sar-m-freq
01620	LC_ALL=C TZ=GMT ./sadf -d tests/data-wghfreq.tmp -- -m FREQ -P ALL > tests/out.data-wghfreq-sadf-d.tmp
01625	diff -u tests/out.data-wghfreq-sadf-d.tmp tests/expected.data-wghfreq-sadf-d
01630	LC_ALL=C TZ=GMT ./sadf -p tests/data-wghfreq.tmp -- -m FREQ -P ALL > tests/out.data-wghfreq-sadf-p.tmp
01635	diff -u tests/out.data-wghfreq-sadf-p.tmp tests/expected.data-wghfreq-sadf-p
01640	LC_ALL=C TZ=GMT ./sadf -r tests/data-wghfreq.tmp -- -m FREQ -P ALL > tests/out.data-wghfreq-sadf-r.tmp
01645	diff -u tests/out.data-wghfreq-sadf-r.tmp tests/expected.data-wghfreq-sadf-r
01650	LC_ALL=C TZ=GMT ./sadf -j tests/data-wghfreq.tmp -- -m FREQ -P ALL > tests/out.data-wghfreq-sadf-j.tmp
01655	diff -u tests/out.data-wghfreq-sadf-j.tmp tests/expected.data-wghfreq-sadf-j
01657	cat tests/out.data-wghfreq-sadf-j.tmp | $VER_JSON >/dev/null;
01660	LC_ALL=C TZ=GMT ./sadf -x tests/data-wghfreq.tmp -- -m FREQ -P ALL > tests/out.data-wghfreq-sadf-x.tmp
01665	diff -u tests/out.data-wghfreq-sadf-x.tmp tests/expected.data-wghfreq-sadf-x
01667	cat tests/out.data-wghfreq-sadf-x.tmp | $VER_XML --schema xml/sysstat.xsd - >/dev/null;
01669	cat tests/out.data-wghfreq-sadf-x.tmp | $VER_XML --dtdvalid xml/sysstat-*.dtd - >/dev/null;

=====	iostat tests (basic output)
02010	LC_ALL=C TZ=GMT ./iostat 2 3 > tests/out.iostat.tmp
02015	diff -u tests/out.iostat.tmp tests/expected.iostat
02020	LC_ALL=C TZ=GMT ./iostat ALL 2 3 > tests/out.iostat-ALL.tmp
02025	diff -u tests/out.iostat-ALL.tmp tests/expected.iostat-ALL
02030	LC_ALL=C TZ=GMT ./iostat -d -p ALL 2 3 > tests/out.iostat-p-ALL.tmp
02035	diff -u tests/out.iostat-p-ALL.tmp tests/expected.iostat-p-ALL
02040	LC_ALL=C TZ=GMT ./iostat -p sda 2 3 > tests/out.iostat-p-sda.tmp
02045	diff -u tests/out.iostat-p-sda.tmp tests/expected.iostat-p-sda
02050	LC_ALL=C TZ=GMT ./iostat -d ALL -p ALL 2 3 > tests/out.iostat-ALL-p-ALL.tmp
02055	diff -u tests/out.iostat-ALL-p-ALL.tmp tests/expected.iostat-ALL-p-ALL
02060	LC_ALL=C TZ=GMT ./iostat > tests/out.iostat-0.tmp
02065	diff -u tests/out.iostat-0.tmp tests/expected.iostat-0
02070	LC_ALL=C TZ=GMT ./iostat sda sdc 2 3 > tests/out.iostat-list.tmp
02075	diff -u tests/out.iostat-list.tmp tests/expected.iostat-list

=====	iostat extended statistics
02110	LC_ALL=C TZ=GMT ./iostat -x 1 2 > tests/out.iostat-x.tmp
02115	diff -u tests/out.iostat-x.tmp tests/expected.iostat-x
02120	LC_ALL=C TZ=GMT ./iostat -x ALL 1 2 > tests/out.iostat-x-ALL.tmp
02125	diff -u tests/out.iostat-x-ALL.tmp tests/expected.iostat-x-ALL
02130	LC_ALL=C TZ=GMT ./iostat -x -p ALL 1 2 > tests/out.iostat-x-p-ALL.tmp
02135	diff -u tests/out.iostat-x-p-ALL.tmp tests/expected.iostat-x-p-ALL
02140	LC_ALL=C TZ=GMT ./iostat -x -p sda 1 2 > tests/out.iostat-x-p-sda.tmp
02145	diff -u tests/out.iostat-x-p-sda.tmp tests/expected.iostat-x-p-sda
02150	LC_ALL=C TZ=GMT ./iostat -dx ALL -p ALL 1 7 > tests/out.iostat-x-ALL-p-ALL.tmp
02155	diff -u tests/out.iostat-x-ALL-p-ALL.tmp tests/expected.iostat-x-ALL-p-ALL
02160	LC_ALL=C TZ=GMT ./iostat -x > tests/out.iostat-x-0.tmp
02165	diff -u tests/out.iostat-x-0.tmp tests/expected.iostat-x-0
02170	LC_ALL=C TZ=GMT ./iostat -dx -p sdb,sdc > tests/out.iostat-x-list.tmp
02175	diff -u tests/out.iostat-x-list.tmp tests/expected.iostat-x-list

=====	iostat tests (narrow/basic output)
02210	LC_ALL=C TZ=GMT ./iostat -s 1 2 > tests/out.iostat-s.tmp
02215	diff -u tests/out.iostat-s.tmp tests/expected.iostat-s
02220	LC_ALL=C TZ=GMT ./iostat -ds ALL 1 2 > tests/out.iostat-s-ALL.tmp
02225	diff -u tests/out.iostat-s-ALL.tmp tests/expected.iostat-s-ALL
02230	LC_ALL=C TZ=GMT ./iostat -s sdb -p ALL 1 2 > tests/out.iostat-s-list-p.tmp
02235	diff -u tests/out.iostat-s-list-p.tmp tests/expected.iostat-s-list-p
02240	LC_ALL=C TZ=GMT ./iostat -s -p > tests/out.iostat-sp-0.tmp
02245	diff -u tests/out.iostat-sp-0.tmp tests/expected.iostat-sp-0
02250	LC_ALL=C TZ=GMT ./iostat -s ALL -p ALL 1 2 > tests/out.iostat-s-ALL-p-ALL.tmp
02255	diff -u tests/out.iostat-s-ALL-p-ALL.tmp tests/expected.iostat-s-ALL-p-ALL
02260	LC_ALL=C TZ=GMT ./iostat -s > tests/out.iostat-s-0.tmp
02265	diff -u tests/out.iostat-s-0.tmp tests/expected.iostat-s-0
02270	LC_ALL=C TZ=GMT ./iostat -ds sda -p sdb 1 2 > tests/out.iostat-s-list.tmp
02275	diff -u tests/out.iostat-s-list.tmp tests/expected.iostat-s-list

=====	iostat extended statistics (narrow output)
02310	LC_ALL=C TZ=GMT ./iostat -xs 2 3 > tests/out.iostat-xs.tmp
02315	diff -u tests/out.iostat-xs.tmp tests/expected.iostat-xs
02320	LC_ALL=C TZ=GMT ./iostat -dxs /dev/sdb 2 3 > tests/out.iostat-xs-sdb.tmp
02325	diff -u tests/out.iostat-xs-sdb.tmp tests/expected.iostat-xs-sdb
02340	LC_ALL=C TZ=GMT ./iostat -dxs -p sda 2 3 > tests/out.iostat-xs-p-sda.tmp
02345	diff -u tests/out.iostat-xs-p-sda.tmp tests/expected.iostat-xs-p-sda
02370	LC_ALL=C TZ=GMT ./iostat -xs sda1 sda3 sdc1 -p sdb,sdd > tests/out.iostat-xs-list.tmp
02375	diff -u tests/out.iostat-xs-list.tmp tests/expected.iostat-xs-list
02380	LC_ALL=C TZ=GMT ./iostat -xs sda3 sda1 1 3 > tests/out.iostat-xs-list-part.tmp
02385	diff -u tests/out.iostat-xs-list-part.tmp tests/expected.iostat-xs-list-part

=====	Playing with iostat
02410	LC_ALL=C TZ=GMT ./iostat 2 > tests/out.iostat-sigint.tmp
	[Simulate a Ctrl/C]
02415	diff -u tests/out.iostat-sigint.tmp tests/expected.iostat-sigint
02420	LC_ALL=C TZ=GMT ./iostat -d foo > tests/out.iostat-foo.tmp
02425	diff -u tests/out.iostat-foo.tmp tests/expected.iostat-foo
02430	LC_ALL=C TZ=GMT ./iostat -ct 1 2 > tests/out.iostat-ct.tmp
02435	diff -u tests/out.iostat-ct.tmp tests/expected.iostat-ct
02440	LC_ALL=C TZ=GMT ./iostat -d -g disks sda sdb -g other sdc sdd 1 2 > tests/out.iostat-g.tmp
02445	diff -u tests/out.iostat-g.tmp tests/expected.iostat-g
02450	LC_ALL=C TZ=GMT ./iostat -dH -g disks sda sdb -g other sdc sdd 1 2 > tests/out.iostat-gH.tmp
02455	diff -u tests/out.iostat-gH.tmp tests/expected.iostat-gH
02460	LC_ALL=C TZ=GMT ./iostat --dec=1 1 2 > tests/out.iostat-dec.tmp
02465	diff -u tests/out.iostat-dec.tmp tests/expected.iostat-dec
02470	LC_ALL=C TZ=GMT ./iostat -d -p ALL -j PATH > tests/out.iostat-jPATH.tmp
02472	diff -u tests/out.iostat-jPATH.tmp tests/expected.iostat-jPATH
02474	LC_ALL=C TZ=GMT ./iostat -d -p ALL -j ID > tests/out.iostat-jID.tmp
02476	diff -u tests/out.iostat-jID.tmp tests/expected.iostat-jID
02480	LC_ALL=C TZ=GMT ./iostat -d -p ALL -j LABEL > tests/out.iostat-jLABEL.tmp
02482	diff -u tests/out.iostat-jLABEL.tmp tests/expected.iostat-jLABEL
02484	LC_ALL=C TZ=GMT ./iostat -d -p ALL -j PARTUUID > tests/out.iostat-jPARTUUID.tmp
02486	diff -u tests/out.iostat-jPARTUUID.tmp tests/expected.iostat-jPARTUUID

=====	Testing iostat error cases
02500	LC_ALL=C ./iostat 2 0 2>&1 | grep "Usage:" >/dev/null
02505	LC_ALL=C ./iostat -2 1 2>&1 | grep "Usage:" >/dev/null
02510	LC_ALL=C ./iostat 2 -1 2>&1 | grep "Usage:" >/dev/null
02515	LC_ALL=C ./iostat -H 2>&1 | grep "Usage:" >/dev/null
02520	LC_ALL=C ./iostat -j FOObar 2>&1 | grep "Invalid" >/dev/null

=====	Playing again with iostat
02600	LC_ALL=C TZ=GMT ./iostat -ym 1 2 > tests/out.iostat-ym.tmp
02605	diff -u tests/out.iostat-ym.tmp tests/expected.iostat-ym
02610	LC_ALL=C TZ=GMT ./iostat --human > tests/out.iostat-human.tmp
02615	diff -u tests/out.iostat-human.tmp tests/expected.iostat-human
02620	LC_ALL=C TZ=GMT ./iostat -dh -p ALL > tests/out.iostat-h.tmp
02625	diff -u tests/out.iostat-h.tmp tests/expected.iostat-h
02630	LC_ALL=C TZ=GMT ./iostat -kz -p ALL 1 2 > tests/out.iostat-kz.tmp
02635	diff -u tests/out.iostat-kz.tmp tests/expected.iostat-kz
02640	LC_ALL=C TZ=GMT ./iostat -dN -p ALL > tests/out.iostat-N.tmp
02645	diff -u tests/out.iostat-N.tmp tests/expected.iostat-N
02650	LC_ALL=C TZ=GMT ./iostat -d -j LABEL OS SYSTEM 1 2 > tests/out.iostat-jLABEL-list.tmp
02655	diff -u tests/out.iostat-jLABEL-list.tmp tests/expected.iostat-jLABEL-list
02660	LC_ALL=C TZ=GMT ./iostat -dxs -j UUID 2578463f-6947-48c7-8b09-876a4145cfb1 1 2 > tests/out.iostat-jUUID-list.tmp
02665	diff -u tests/out.iostat-jUUID-list.tmp tests/expected.iostat-jUUID-list
02670	LC_ALL=C TZ=GMT ./iostat -g total sda -g foo 1 2 > tests/out.iostat-g2.tmp
02675	diff -u tests/out.iostat-g2.tmp tests/expected.iostat-g2
02680	LC_ALL=C TZ=GMT ./iostat -g total ALL 1 2 > tests/out.iostat-gALL.tmp
02685	diff -u tests/out.iostat-gALL.tmp tests/expected.iostat-gALL
02690	LC_ALL=C TZ=GMT ./iostat -g total -p ALL 1 2 > tests/out.iostat-gpALL.tmp
02695	diff -u tests/out.iostat-gpALL.tmp tests/expected.iostat-gpALL
02700	LC_ALL=C TZ=GMT ./iostat -g total -p sda 1 2 > tests/out.iostat-gp.tmp
02705	diff -u tests/out.iostat-gp.tmp tests/expected.iostat-gp
02710	LC_ALL=C TZ=GMT ./iostat -g total -p sda -y 1 3 > tests/out.iostat-gpy.tmp
02715	diff -u tests/out.iostat-gpy.tmp tests/expected.iostat-gpy
02720	LC_ALL=C TZ=GMT ./iostat -p cciss/c0d0 1 2 > tests/out.iostat-p-cciss.tmp
02725	diff -u tests/out.iostat-p-cciss.tmp tests/expected.iostat-p-cciss
02730	LC_ALL=C TZ=GMT ./iostat cciss/c0d0p1 1 2 > tests/out.iostat-cciss.tmp
02735	diff -u tests/out.iostat-cciss.tmp tests/expected.iostat-cciss

=====	iostat: Playing with environment variables
02800	LC_ALL=C TZ=GMT S_TIME_FORMAT=ISO S_COLORS=never POSIXLY_CORRECT= ./iostat --getenv -d 2 3 > tests/out.iostat-ev.tmp
02805	diff -u tests/out.iostat-ev.tmp tests/expected.iostat-ev

=====	Tests to be done at the very end
09900	grep -i FIXME *.c *.h *.in && exit 1 || exit 0
