Add a rudimentary test for procstat kstack.
MFC after: 1 week
This commit is contained in:
parent
bcc7f4c221
commit
0dbdecfd4f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=337133
@ -144,10 +144,25 @@ file_descriptor_body()
|
|||||||
atf_check -o match:"$line_re" awk 'NR > 1' procstat.out
|
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_init_test_cases()
|
||||||
{
|
{
|
||||||
atf_add_test_case binary_info
|
atf_add_test_case binary_info
|
||||||
atf_add_test_case command_line_arguments
|
atf_add_test_case command_line_arguments
|
||||||
atf_add_test_case environment
|
atf_add_test_case environment
|
||||||
atf_add_test_case file_descriptor
|
atf_add_test_case file_descriptor
|
||||||
|
atf_add_test_case kernel_stacks
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user