Commit 540abc9
CKI Backport Bot
selftests: net: exit cleanly on SIGTERM / timeout
JIRA: https://issues.redhat.com/browse/RHEL-115594
commit 8f0ae19
Author: Jakub Kicinski <kuba@kernel.org>
Date: Fri May 2 18:18:56 2025 -0700
selftests: net: exit cleanly on SIGTERM / timeout
ksft runner sends 2 SIGTERMs in a row if a test runs out of time.
Handle this in a similar way we handle SIGINT - cleanup and stop
running further tests.
Because we get 2 signals we need a bit of logic to ignore
the subsequent one, they come immediately one after the other
(due to commit 9616cb3 ("kselftest/runner.sh: Propagate SIGTERM
to runner child")).
This change makes sure we run cleanup (scheduled defer()s)
and also print a stack trace on SIGTERM, which doesn't happen
by default. Tests occasionally hang in NIPA and it's impossible
to tell what they are waiting from or doing.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.link/20250503011856.46308-1-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>1 parent 008ae62 commit 540abc9
1 file changed
+23
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
| |||
183 | 188 | | |
184 | 189 | | |
185 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
186 | 202 | | |
187 | 203 | | |
188 | 204 | | |
| |||
195 | 211 | | |
196 | 212 | | |
197 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
198 | 218 | | |
199 | 219 | | |
200 | 220 | | |
| |||
223 | 243 | | |
224 | 244 | | |
225 | 245 | | |
226 | | - | |
| 246 | + | |
227 | 247 | | |
228 | 248 | | |
229 | 249 | | |
| |||
238 | 258 | | |
239 | 259 | | |
240 | 260 | | |
| 261 | + | |
| 262 | + | |
241 | 263 | | |
242 | 264 | | |
243 | 265 | | |
| |||
0 commit comments