Skip to content

Commit

Permalink
Limit retries to 10 attempts
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Jowett <[email protected]>
  • Loading branch information
Alan Jowett committed Oct 4, 2024
1 parent c3000d0 commit 2eeb06c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/api_test/api_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ static _Success_(return == 0) int _program_load_helper(
bpf_program__set_type(program, prog_type);
}

int error;
for (;;) {
int error = -EBUSY;
for (size_t retries = 0; retries < 10; retries++) {
error = bpf_object__load(new_object);
if (error == -EBUSY) {
// Wait for the previous driver to be unloaded.
Expand Down

0 comments on commit 2eeb06c

Please sign in to comment.