Commit a3faf7f
committed
test-case/check-sof-logger.sh: Fix logger selection and broaden timeout handling
Two independent fixes:
Logger selection when multiple sof-logger binaries exist in PATH:
- Move 'loggerBin=$(type -p sof-logger)' before the md5 check so
default is always available
- Replace die() with dlogw() when different-checksum binaries are found;
test can still run with clearly chosen binary
- Prefer distro-managed system binary (/usr/bin/sof-logger, then
/bin/sof-logger) over locally-built /usr/local copy; log the chosen
path at dlogw level
- Falls back to the original 'type -p' result if neither system path exists
Timeout exit code handling:
- Introduce helper timeout_status_ok(): returns 0 for exit codes 124
(standard 'timeout' expiry) and 125 (some wrapper/edge-case paths)
- Replace hardcoded 'test -eq 124' checks (DMA logger,
mtrace, etrace) with calls to timeout_status_ok(); prevents spurious
'unexpected exit status' failures on systems where timeout returns 125
Signed-off-by: Mateusz Junkier <mateusz.junkier@intel.com>1 parent 3768bfe commit a3faf7f
1 file changed
Lines changed: 27 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
52 | 62 | | |
53 | | - | |
54 | 63 | | |
55 | 64 | | |
56 | 65 | | |
| |||
72 | 81 | | |
73 | 82 | | |
74 | 83 | | |
75 | | - | |
| 84 | + | |
| 85 | + | |
76 | 86 | | |
| 87 | + | |
77 | 88 | | |
78 | 89 | | |
| 90 | + | |
79 | 91 | | |
80 | 92 | | |
81 | 93 | | |
| |||
109 | 121 | | |
110 | 122 | | |
111 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
112 | 129 | | |
113 | 130 | | |
114 | 131 | | |
| |||
182 | 199 | | |
183 | 200 | | |
184 | 201 | | |
185 | | - | |
186 | | - | |
| 202 | + | |
187 | 203 | | |
188 | 204 | | |
189 | 205 | | |
| |||
196 | 212 | | |
197 | 213 | | |
198 | 214 | | |
199 | | - | |
| 215 | + | |
200 | 216 | | |
201 | 217 | | |
202 | 218 | | |
| |||
205 | 221 | | |
206 | 222 | | |
207 | 223 | | |
208 | | - | |
| 224 | + | |
209 | 225 | | |
210 | 226 | | |
211 | 227 | | |
| |||
0 commit comments