From e402c70856a37526594ae4d74a93d37a04030a2a Mon Sep 17 00:00:00 2001 From: Yiqian Xun Date: Fri, 21 Feb 2025 11:35:55 +0800 Subject: [PATCH] selftests/user_events: Fix failures caused by test code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In parse_abi function,the dyn_test fails because the enable_file isn’t closed after successfully registering an event. By adding wait_for_delete(), the dyn_test now passes as expected. Link: https://lore.kernel.org/r/20250221033555.326716-1-realxxyq@163.com Signed-off-by: Yiqian Xun Acked-by: Beau Belgrave Acked-by: Steven Rostedt (Google) Signed-off-by: Shuah Khan --- tools/testing/selftests/user_events/dyn_test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/user_events/dyn_test.c b/tools/testing/selftests/user_events/dyn_test.c index bdf9ab127488f..54c9412f8deea 100644 --- a/tools/testing/selftests/user_events/dyn_test.c +++ b/tools/testing/selftests/user_events/dyn_test.c @@ -127,6 +127,8 @@ static int parse_abi(int *check, const char *value) close(fd); + wait_for_delete(); + return ret; }