File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -332,16 +332,6 @@ _test_libbpf_program_pinning(ebpf_execution_type_t execution_type)
332332 struct bpf_object * object = bpf_object__open (file_name);
333333 REQUIRE (object != nullptr );
334334
335- // Scope exit to ensure cleanup during fault injection
336- // auto cleanup = std::unique_ptr<void, std::function<void(void*)>>(
337- // reinterpret_cast<void*>(1),
338- // [object](void*) {
339- // // Cleanup - in unique_ptr scope guard to ensure cleanup on failure.
340- // if (object != nullptr) {
341- // bpf_object__close(object);
342- // }
343- // });
344-
345335 // Load the program(s).
346336 REQUIRE (bpf_object__load (object) == 0 );
347337
@@ -400,7 +390,7 @@ _test_libbpf_program_pinning(ebpf_execution_type_t execution_type)
400390 result = bpf_object__unpin_maps (object, pin_path);
401391 REQUIRE (result == 0 );
402392
403- // cleanup will automatically be called when going out of scope
393+ bpf_object__close (object);
404394}
405395
406396DECLARE_ALL_TEST_CASES (" libbpf program pinning" , " [libbpf]" , _test_libbpf_program_pinning);
You can’t perform that action at this time.
0 commit comments