Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Aug 2018 15:35:48 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r337542 - stable/11/usr.bin/procstat/tests
Message-ID:  <201808091535.w79FZmkw003659@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Thu Aug  9 15:35:48 2018
New Revision: 337542
URL: https://svnweb.freebsd.org/changeset/base/337542

Log:
  MFC r337133:
  Add a rudimentary test for procstat kstack.

Modified:
  stable/11/usr.bin/procstat/tests/procstat_test.sh
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.bin/procstat/tests/procstat_test.sh
==============================================================================
--- stable/11/usr.bin/procstat/tests/procstat_test.sh	Thu Aug  9 15:22:38 2018	(r337541)
+++ stable/11/usr.bin/procstat/tests/procstat_test.sh	Thu Aug  9 15:35:48 2018	(r337542)
@@ -131,10 +131,25 @@ file_descriptor_body()
 	atf_check -o match:"$line_re" awk 'NR > 1' procstat.out
 }
 
+atf_test_case kernel_stacks
+kernel_stacks_head()
+{
+	atf_set "descr" "Captures kernel stacks for all visible threads"
+}
+kernel_stacks_body()
+{
+	atf_check -o save:procstat.out procstat -a kstack
+	atf_check -o not-empty awk '{if ($3 == "procstat") print}' procstat.out
+
+	atf_check -o save:procstat.out procstat -kka
+	atf_check -o not-empty awk '{if ($3 == "procstat") print}' procstat.out
+}
+
 atf_init_test_cases()
 {
 	atf_add_test_case binary_info
 	atf_add_test_case command_line_arguments
 	atf_add_test_case environment
 	atf_add_test_case file_descriptor
+	atf_add_test_case kernel_stacks
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808091535.w79FZmkw003659>