| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: t_cpuctl.sh,v 1.2 2020/06/24 10:07:13 jruoho Exp $ | | 1 | # $NetBSD: t_cpuctl.sh,v 1.3 2020/06/25 15:43:26 jruoho Exp $ |
2 | # | | 2 | # |
3 | # Copyright (c) 2020 The NetBSD Foundation, Inc. | | 3 | # Copyright (c) 2020 The NetBSD Foundation, Inc. |
4 | # All rights reserved. | | 4 | # All rights reserved. |
5 | # | | 5 | # |
6 | # This code is derived from software contributed to The NetBSD Foundation | | 6 | # This code is derived from software contributed to The NetBSD Foundation |
7 | # by Jukka Ruohonen. | | 7 | # by Jukka Ruohonen. |
8 | # | | 8 | # |
9 | # Redistribution and use in source and binary forms, with or without | | 9 | # Redistribution and use in source and binary forms, with or without |
10 | # modification, are permitted provided that the following conditions | | 10 | # modification, are permitted provided that the following conditions |
11 | # are met: | | 11 | # are met: |
12 | # 1. Redistributions of source code must retain the above copyright | | 12 | # 1. Redistributions of source code must retain the above copyright |
13 | # notice, this list of conditions and the following disclaimer. | | 13 | # notice, this list of conditions and the following disclaimer. |
14 | # 2. Redistributions in binary form must reproduce the above copyright | | 14 | # 2. Redistributions in binary form must reproduce the above copyright |
| @@ -116,33 +116,33 @@ err_body() { | | | @@ -116,33 +116,33 @@ err_body() { |
116 | cpuctl list > $tmp | | 116 | cpuctl list > $tmp |
117 | ncpu=$(sysctl -n hw.ncpu) | | 117 | ncpu=$(sysctl -n hw.ncpu) |
118 | | | 118 | |
119 | atf_check -s exit:1 -e ignore \ | | 119 | atf_check -s exit:1 -e ignore \ |
120 | -o empty -x cpuctl identify -1 | | 120 | -o empty -x cpuctl identify -1 |
121 | | | 121 | |
122 | atf_check -s exit:1 -e ignore \ | | 122 | atf_check -s exit:1 -e ignore \ |
123 | -o empty -x cpuctl offline -1 | | 123 | -o empty -x cpuctl offline -1 |
124 | | | 124 | |
125 | atf_check -s exit:1 -e ignore \ | | 125 | atf_check -s exit:1 -e ignore \ |
126 | -o empty -x cpuctl nointr -1 | | 126 | -o empty -x cpuctl nointr -1 |
127 | | | 127 | |
128 | atf_check -s exit:1 -e ignore \ | | 128 | atf_check -s exit:1 -e ignore \ |
129 | -o empty -x cpuctl identify $(exp ncpu + 1) | | 129 | -o empty -x cpuctl identify $(expr ncpu + 1) |
130 | | | 130 | |
131 | atf_check -s exit:1 -e ignore \ | | 131 | atf_check -s exit:1 -e ignore \ |
132 | -o empty -x cpuctl offline $(exp ncpu + 1) | | 132 | -o empty -x cpuctl offline $(expr ncpu + 1) |
133 | | | 133 | |
134 | atf_check -s exit:1 -e ignore \ | | 134 | atf_check -s exit:1 -e ignore \ |
135 | -o empty -x cpuctl nointr $(exp ncpu + 1) | | 135 | -o empty -x cpuctl nointr $(expr ncpu + 1) |
136 | } | | 136 | } |
137 | | | 137 | |
138 | err_cleanup() { | | 138 | err_cleanup() { |
139 | clean | | 139 | clean |
140 | } | | 140 | } |
141 | | | 141 | |
142 | # identify | | 142 | # identify |
143 | # | | 143 | # |
144 | atf_test_case identify | | 144 | atf_test_case identify |
145 | identify_head() { | | 145 | identify_head() { |
146 | atf_require_prog cpuctl | | 146 | atf_require_prog cpuctl |
147 | atf_set "descr" "Test that cpuctl(8) identifies at least " \ | | 147 | atf_set "descr" "Test that cpuctl(8) identifies at least " \ |
148 | "something without segfaulting (PR bin/54220)" | | 148 | "something without segfaulting (PR bin/54220)" |