Skip to content

Commit b75daca

Browse files
Yucong Sunanakryiko
authored andcommitted
selftests/bpf: Fix crash in core_reloc when bpftool btfgen fails
Avoid unnecessary goto cleanup, as there is nothing to clean up. Signed-off-by: Yucong Sun <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent b38101c commit b75daca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/selftests/bpf/prog_tests/core_reloc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -888,12 +888,12 @@ static void run_core_reloc_tests(bool use_btfgen)
888888

889889
fd = mkstemp(btf_file);
890890
if (!ASSERT_GE(fd, 0, "btf_tmp"))
891-
goto cleanup;
891+
continue;
892892
close(fd); /* we only need the path */
893893
err = run_btfgen(test_case->btf_src_file, btf_file,
894894
test_case->bpf_obj_file);
895895
if (!ASSERT_OK(err, "run_btfgen"))
896-
goto cleanup;
896+
continue;
897897

898898
test_case->btf_src_file = btf_file;
899899
}

0 commit comments

Comments
 (0)