Commit 19e3c3f
committed
selftests/bpf: Fix parse_int() on 32-bit
Several failures running test_progs relate to parsing int stings:
tester_init:PASS:tester_log_buf 0 nsec
process_subtest:PASS:obj_open_mem 0 nsec
process_subtest:PASS:specs_alloc 0 nsec
parse_int:FAIL:281 failed to parse __retval from '0xFFFFff23'
process_subtest:FAIL:1153 Can't parse test spec for program 'mov32sx_s16'
torvalds#532 verifier_movsx:FAIL
These occur because strtol() used by parse_int() will overflow on 32-bit
with typical values like '0xd495cdc0'. Fix by using strtoll() instead.
Fixes: 19a8e06 ("selftests/bpf: Tests execution support for test_loader.c")
Signed-off-by: Tony Ambardar <tony.ambardar@gmail.com>1 parent c1e9b30 commit 19e3c3f
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
276 | | - | |
| 276 | + | |
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
| 280 | + | |
281 | 281 | | |
282 | | - | |
| 282 | + | |
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
| |||
0 commit comments