From: Sebastien GODARD Date: Sat, 4 Apr 2020 07:54:07 +0000 (+0200) Subject: pidstat: Add a new non regression test X-Git-Tag: v12.3.2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6b21f0779c83031bcecbb7e0812415641c586788;p=sysstat pidstat: Add a new non regression test This is to test pidstat's option -e. Signed-off-by: Sebastien GODARD --- diff --git a/tests/05450 b/tests/05450 new file mode 100644 index 0000000..2ed5359 --- /dev/null +++ b/tests/05450 @@ -0,0 +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 --git a/tests/05455 b/tests/05455 new file mode 100644 index 0000000..6eb9997 --- /dev/null +++ b/tests/05455 @@ -0,0 +1 @@ +diff -u tests/out.pidstat-e.tmp tests/expected.pidstat-e diff --git a/tests/TLIST b/tests/TLIST index 8b1ce60..147aa1e 100644 --- a/tests/TLIST +++ b/tests/TLIST @@ -589,6 +589,8 @@ NOTES: 05435 diff -u tests/out.pidstat-Uroot.tmp tests/expected.pidstat-Uroot 05440 LC_ALL=C TZ=GMT ./pidstat -t -svwu -p 21342,1234,7900,9009 2 6 > tests/out.pidstat-plist.tmp 05445 diff -u tests/out.pidstat-plist.tmp tests/expected.pidstat-plist +05450 LC_ALL=C TZ=GMT ./pidstat 2 6 -t -e sleep 1 > tests/out.pidstat-e.tmp +05455 diff -u tests/out.pidstat-e.tmp tests/expected.pidstat-e ===== Tests to be done at the very end 09900 grep -i FIXME *.c *.h *.in && exit 1 || exit 0 diff --git a/tests/expected.pidstat-e b/tests/expected.pidstat-e new file mode 100644 index 0000000..2eab598 --- /dev/null +++ b/tests/expected.pidstat-e @@ -0,0 +1,45 @@ +Linux 1.2.3-TEST (SYSSTAT.TEST) 01/01/70 _x86_64_ (8 CPU) + +00:00:00 UID TGID TID %usr %system %guest %wait %CPU CPU Command +00:00:02 1000 8741 - 0.00 0.00 0.00 0.00 0.00 0 firefox +00:00:02 1000 - 8741 0.03 0.00 0.00 0.00 0.03 0 |__firefox +00:00:02 1000 - 8785 0.00 0.00 0.00 0.00 0.00 3 |__JS Helper +00:00:02 1000 - 8789 0.00 0.00 0.00 0.00 0.00 2 |__Link Monitor +00:00:02 1000 - 8835 0.00 0.00 0.00 0.00 0.00 0 |__ImgDecoder #1 +00:00:02 1000 - 9109 0.00 0.00 0.00 0.00 0.00 7 |__DOM Worker +00:00:04 1000 8741 - 0.13 0.03 0.00 0.03 0.16 5 firefox +00:00:04 1000 - 8741 0.06 0.00 0.00 0.03 0.06 5 |__firefox +00:00:04 1000 - 8785 0.00 0.00 0.00 0.00 0.00 3 |__JS Helper +00:00:04 1000 - 8789 0.00 0.00 0.00 0.00 0.00 2 |__Link Monitor +00:00:04 1000 - 8835 0.00 0.00 0.00 0.00 0.00 0 |__ImgDecoder #1 +00:00:04 1000 - 9109 0.00 0.00 0.00 0.00 0.00 7 |__DOM Worker +00:00:06 1000 8741 - 0.00 0.00 0.00 0.00 0.00 5 firefox +00:00:06 1000 - 8741 0.00 0.00 0.00 0.00 0.00 5 |__firefox +00:00:06 1000 - 8785 0.00 479136209706741632.00 0.00 0.00 479136209706741632.00 5 |__disk_cache:0 +00:00:06 1000 - 8789 0.00 0.00 0.00 0.00 0.00 2 |__Link Monitor +00:00:06 1000 - 8835 0.00 0.00 0.00 0.00 0.00 0 |__ImgDecoder #1 +00:00:06 1000 - 9109 0.00 0.00 0.00 0.00 0.00 7 |__DOM Worker +00:00:08 1000 8741 - 0.00 0.00 0.00 0.00 0.00 5 firefox +00:00:08 1000 - 8741 0.00 0.00 0.00 0.00 0.00 5 |__firefox +00:00:08 1000 - 8785 0.00 0.00 0.00 0.00 0.00 5 |__disk_cache:0 +00:00:08 1000 - 8789 0.00 0.00 0.00 0.00 0.00 2 |__Link Monitor +00:00:08 1000 - 8835 0.00 0.00 0.00 0.00 0.00 0 |__ImgDecoder #1 +00:00:08 1000 - 9109 0.00 0.00 0.00 0.00 0.00 7 |__DOM Worker +00:00:10 1000 8741 - 0.00 0.00 0.00 0.00 0.00 5 firefox +00:00:10 1000 - 8741 0.00 0.00 0.00 0.00 0.00 5 |__firefox +00:00:10 1000 - 8785 0.00 0.00 0.00 0.00 0.00 5 |__disk_cache:0 +00:00:10 1000 - 8789 0.00 0.00 0.00 0.00 0.00 2 |__Link Monitor +00:00:10 1000 - 8835 0.00 0.00 0.00 0.00 0.00 0 |__ImgDecoder #1 +00:00:10 1000 - 9109 0.00 0.00 0.00 0.00 0.00 7 |__DOM Worker +00:00:12 1000 8741 - 0.00 0.00 0.00 0.00 0.00 5 firefox +00:00:12 1000 - 8741 0.00 0.00 0.00 0.00 0.00 5 |__firefox +00:00:12 1000 - 8785 0.00 0.00 0.00 0.00 0.00 5 |__disk_cache:0 +00:00:12 1000 - 8789 0.00 0.00 0.00 0.00 0.00 2 |__Link Monitor +00:00:12 1000 - 8835 0.00 0.00 0.00 0.00 0.00 0 |__ImgDecoder #1 +00:00:12 1000 - 9109 0.00 0.00 0.00 0.00 0.00 7 |__DOM Worker +Average: 1000 8741 - 0.13 0.03 0.00 0.03 0.16 - firefox +Average: 1000 - 8741 0.10 0.00 0.00 0.03 0.10 - |__firefox +Average: 1000 - 8785 0.00 591810846124785152.00 0.00 0.00 591810846124785152.00 - |__disk_cache:0 +Average: 1000 - 8789 0.00 0.00 0.00 0.00 0.00 - |__Link Monitor +Average: 1000 - 8835 0.00 0.00 0.00 0.00 0.00 - |__ImgDecoder #1 +Average: 1000 - 9109 0.00 0.00 0.00 0.00 0.00 - |__DOM Worker