Skip to content

Commit bc064a0

Browse files
committed
Cleaned up comments.
1 parent 129e95c commit bc064a0

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

tests/unit/libbpf_test.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff 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

406396
DECLARE_ALL_TEST_CASES("libbpf program pinning", "[libbpf]", _test_libbpf_program_pinning);

0 commit comments

Comments
 (0)