From 7131e5506fcceeef0eacc5b4935a267f06f5168e Mon Sep 17 00:00:00 2001 From: Sander Mertens Date: Mon, 30 Oct 2023 12:02:35 -0700 Subject: [PATCH] Fix issue where testcase process would throw signal 4 --- drivers/test/src/test.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/test/src/test.c b/drivers/test/src/test.c index 6559654..46fd9b0 100644 --- a/drivers/test/src/test.c +++ b/drivers/test/src/test.c @@ -253,9 +253,16 @@ void* bake_test_run_suite_range( ut_log( "#[red]FAIL#[reset]: %s segfaulted\n", test_name); } else { + /* Signal 4 seems to get thrown every now and then when + * trying to create lots of processes. Retry a few times + * before actually failing the test. */ if (sig == 4) { retry_count ++; if (retry_count < 5) { + /* Don't retry too fast in case OS resources are + * limited. */ + ut_sleep(0, 100 * 1000 * 1000); + ut_log("#[grey]retrying after sig 4...\n"); goto retry; } else { ut_log("#[red]retried 5 times after sig 4\n");