diff options
| author | Feng Yang <yangfeng@kylinos.cn> | 2025-09-08 14:08:10 +0800 |
|---|---|---|
| committer | Martin KaFai Lau <martin.lau@kernel.org> | 2025-09-08 09:51:13 -0700 |
| commit | 93a83d044314b041ffe2bb1d43b8b0cea7f60921 (patch) | |
| tree | 17eec3cec729a6a0748d604a42b7157ad67f2a5a /scripts/lib/kdoc/kdoc_re.py | |
| parent | e12873ee856ffa6f104869b8ea10c0f741606f13 (diff) | |
selftests/bpf: Fix the issue where the error code is 0
The error message printed here only uses the previous err value,
which results in it being printed as 0.
When bpf_map__attach_struct_ops encounters an error,
it uses libbpf_err_ptr(err) to set errno = -err and returns NULL.
Therefore, Using -errno can fix this issue.
Fix before:
run_subtest:FAIL:1019 bpf_map__attach_struct_ops failed for map pro_epilogue: err=0
Fix after:
run_subtest:FAIL:1019 bpf_map__attach_struct_ops failed for map pro_epilogue: err=-9
Signed-off-by: Feng Yang <yangfeng@kylinos.cn>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/20250908060810.1054341-1-yangfeng59949@163.com
Diffstat (limited to 'scripts/lib/kdoc/kdoc_re.py')
0 files changed, 0 insertions, 0 deletions
