From 1a17371f514bb73adad716de3408247ab049ab9f Mon Sep 17 00:00:00 2001 From: Alan Jowett Date: Fri, 6 Sep 2024 08:42:44 -0700 Subject: [PATCH] Limit retries to 10 attempts Signed-off-by: Alan Jowett --- tests/api_test/api_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/api_test/api_test.cpp b/tests/api_test/api_test.cpp index 4c5f9e698f..dbbaff1b7a 100644 --- a/tests/api_test/api_test.cpp +++ b/tests/api_test/api_test.cpp @@ -92,7 +92,7 @@ static _Success_(return == 0) int _program_load_helper( } int error; - for (;;) { + 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.