]> granicus.if.org Git - sysstat/commitdiff
Add new non regression tests
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 24 Apr 2021 14:09:30 +0000 (16:09 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 24 Apr 2021 14:09:30 +0000 (16:09 +0200)
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
tests/05450
tests/05452 [new file with mode: 0644]
tests/TLIST
tests/expected2.pidstat-e [new file with mode: 0644]
tests/extra/0010 [new file with mode: 0644]
tests/extra/XTLIST

index 239a1d5ada872a12df78cc9c71888e79daa7ec83..bfa755ae4d1eafb54beb2f1084075ef581f75948 100644 (file)
@@ -1,3 +1,3 @@
 rm -f tests/root
 ln -s root1 tests/root
-LC_ALL=C TZ=GMT ./pidstat 2 6 -t -e sleep 1 > tests/out.pidstat-e.tmp && diff -u tests/expected.pidstat-e tests/out.pidstat-e.tmp
+LC_ALL=C TZ=GMT ./pidstat 2 6 -t -e sleep 3 > tests/out.pidstat-e.tmp && diff -u tests/expected.pidstat-e tests/out.pidstat-e.tmp
diff --git a/tests/05452 b/tests/05452
new file mode 100644 (file)
index 0000000..f7fd936
--- /dev/null
@@ -0,0 +1,3 @@
+rm -f tests/root
+ln -s root1 tests/root
+LC_ALL=C TZ=GMT ./pidstat -e sleep 2 > tests/out2.pidstat-e.tmp && diff -u tests/expected2.pidstat-e tests/out2.pidstat-e.tmp
index 5aa891b839b166a8e56505158ddcdd099e95be8e..061b0985017468414ee0959cb692538fceec33b0 100644 (file)
@@ -490,7 +490,8 @@ NOTES:
 05420  LC_ALL=C TZ=GMT ./pidstat -t -rw -u -U foo 2 1 > tests/out.pidstat-Ufoo.tmp
 05430  LC_ALL=C TZ=GMT ./pidstat -t -rw -u -U root 2 1 > tests/out.pidstat-Uroot.tmp
 05440  LC_ALL=C TZ=GMT ./pidstat -t -svwu -p 21342,1234,7900,9009 2 6 > tests/out.pidstat-plist.tmp
-05450  LC_ALL=C TZ=GMT ./pidstat 2 6 -t -e sleep 1 > tests/out.pidstat-e.tmp
+05450  LC_ALL=C TZ=GMT ./pidstat 2 6 -t -e sleep 3 > tests/out.pidstat-e.tmp
+05452  LC_ALL=C TZ=GMT ./pidstat -e sleep 2 > tests/out2.pidstat-e.tmp
 
 =====  Tests to be done at the very end
 09900  grep -i FIXME *.c *.h *.in && exit 1 || exit 0
diff --git a/tests/expected2.pidstat-e b/tests/expected2.pidstat-e
new file mode 100644 (file)
index 0000000..91dd6fd
--- /dev/null
@@ -0,0 +1,5 @@
+Linux 1.2.3-TEST (SYSSTAT.TEST)        01/01/70        _x86_64_        (9 CPU)
+
+00:00:00      UID       PID    %usr %system  %guest   %wait    %CPU   CPU  Command
+00:00:00     1000      8741    0.00    0.00    0.00    0.00    0.00     0  firefox
+Average:     1000      8741    0.00    0.00    0.00    0.00    0.00     -  firefox
diff --git a/tests/extra/0010 b/tests/extra/0010
new file mode 100644 (file)
index 0000000..9fd0ba6
--- /dev/null
@@ -0,0 +1,4 @@
+if [ ! -x configure -o ! -x do_test -o ! -x iconfig ]; then
+       echo Not executable
+       exit 1
+fi
index dcc5267a5f20417560a5131296646a2a5610e323..057fc555d537821bb6d21192388eaab9c05c0f55 100644 (file)
@@ -1,5 +1,8 @@
 Extra tests
 
+====   Global tests
+0010   Check that configure, do_test and iconfig are executable
+
 ====   PCP tests
 0100   LC_ALL=C pmdumplog -a tests/pcpar > tests/extra/out.pcpar.tmp
 0110   LC_ALL=C ./sadf -l -O pcparchive=tests/extra/pcpar-ssr tests/data-ssr.tmp -- -m FAN,TEMP,IN