From owner-svn-src-head@freebsd.org Thu Aug 2 16:03:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76D10106B30E; Thu, 2 Aug 2018 16:03:48 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2A8ED8E7BE; Thu, 2 Aug 2018 16:03:48 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0AE5A13E64; Thu, 2 Aug 2018 16:03:48 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w72G3ls5082903; Thu, 2 Aug 2018 16:03:47 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w72G3lBs082902; Thu, 2 Aug 2018 16:03:47 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201808021603.w72G3lBs082902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 2 Aug 2018 16:03:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r337133 - head/usr.bin/procstat/tests X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/usr.bin/procstat/tests X-SVN-Commit-Revision: 337133 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2018 16:03:48 -0000 Author: markj Date: Thu Aug 2 16:03:47 2018 New Revision: 337133 URL: https://svnweb.freebsd.org/changeset/base/337133 Log: Add a rudimentary test for procstat kstack. MFC after: 1 week Modified: head/usr.bin/procstat/tests/procstat_test.sh Modified: head/usr.bin/procstat/tests/procstat_test.sh ============================================================================== --- head/usr.bin/procstat/tests/procstat_test.sh Thu Aug 2 15:16:59 2018 (r337132) +++ head/usr.bin/procstat/tests/procstat_test.sh Thu Aug 2 16:03:47 2018 (r337133) @@ -144,10 +144,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 }