From b75dacaac4650478ed5a9d33975b91b99016daff Mon Sep 17 00:00:00 2001 From: Yucong Sun Date: Thu, 17 Feb 2022 10:02:10 -0800 Subject: 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 Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20220217180210.2981502-1-fallentree@fb.com --- tools/testing/selftests/bpf/prog_tests/core_reloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/testing/selftests/bpf/prog_tests/core_reloc.c b/tools/testing/selftests/bpf/prog_tests/core_reloc.c index baf53c23c08d..8fbb40a832d5 100644 --- a/tools/testing/selftests/bpf/prog_tests/core_reloc.c +++ b/tools/testing/selftests/bpf/prog_tests/core_reloc.c @@ -888,12 +888,12 @@ static void run_core_reloc_tests(bool use_btfgen) fd = mkstemp(btf_file); if (!ASSERT_GE(fd, 0, "btf_tmp")) - goto cleanup; + continue; close(fd); /* we only need the path */ err = run_btfgen(test_case->btf_src_file, btf_file, test_case->bpf_obj_file); if (!ASSERT_OK(err, "run_btfgen")) - goto cleanup; + continue; test_case->btf_src_file = btf_file; } -- cgit v1.2.3