Commit c068ba9
selftests: traceroute: Return correct value on failure
The test always returns success even if some tests were modified to
fail. Fix by converting the test to use the appropriate library
functions instead of using its own functions.
Before:
# ./traceroute.sh
TEST: IPV6 traceroute [FAIL]
TEST: IPV4 traceroute [ OK ]
Tests passed: 1
Tests failed: 1
$ echo $?
0
After:
# ./traceroute.sh
TEST: IPv6 traceroute [FAIL]
traceroute6 did not return 2000:102::2
TEST: IPv4 traceroute [ OK ]
$ echo $?
1
Reviewed-by: Petr Machata <[email protected]>
Reviewed-by: David Ahern <[email protected]>
Signed-off-by: Ido Schimmel <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>1 parent 4a8c416 commit c068ba9
1 file changed
+9
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 13 | | |
36 | 14 | | |
37 | 15 | | |
| |||
210 | 188 | | |
211 | 189 | | |
212 | 190 | | |
| 191 | + | |
| 192 | + | |
213 | 193 | | |
214 | 194 | | |
215 | | - | |
| 195 | + | |
| 196 | + | |
216 | 197 | | |
217 | 198 | | |
218 | 199 | | |
| |||
275 | 256 | | |
276 | 257 | | |
277 | 258 | | |
| 259 | + | |
| 260 | + | |
278 | 261 | | |
279 | 262 | | |
280 | | - | |
| 263 | + | |
| 264 | + | |
281 | 265 | | |
282 | 266 | | |
283 | 267 | | |
| |||
294 | 278 | | |
295 | 279 | | |
296 | 280 | | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | 281 | | |
301 | 282 | | |
302 | 283 | | |
| |||
308 | 289 | | |
309 | 290 | | |
310 | 291 | | |
311 | | - | |
312 | | - | |
| 292 | + | |
0 commit comments