Skip to content

Commit b8215dc

Browse files
jsitnickiAlexei Starovoitov
authored andcommitted
selftests/bpf, flow_dissector: Close TAP device FD after the test
test_flow_dissector leaves a TAP device after it's finished, potentially interfering with other tests that will run after it. Fix it by closing the TAP descriptor on cleanup. Fixes: 0905bee ("selftests/bpf: run flow dissector tests in skb-less mode") Signed-off-by: Jakub Sitnicki <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent 1f043f8 commit b8215dc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@ void test_flow_dissector(void)
524524
CHECK_ATTR(err, tests[i].name, "bpf_map_delete_elem %d\n", err);
525525
}
526526

527+
close(tap_fd);
527528
bpf_prog_detach(prog_fd, BPF_FLOW_DISSECTOR);
528529
bpf_object__close(obj);
529530
}

0 commit comments

Comments
 (0)