]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests/user_events: Fix failures caused by test code
authorYiqian Xun <xunyiqian@kylinos.cn>
Fri, 21 Feb 2025 03:35:55 +0000 (11:35 +0800)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 24 Feb 2025 23:37:17 +0000 (16:37 -0700)
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 <xunyiqian@kylinos.cn>
Acked-by: Beau Belgrave <beaub@linux.microsoft.com>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/user_events/dyn_test.c

index bdf9ab127488f5018e74c6766233f9d52049ee43..54c9412f8deeab627799e31536d2c6c36afdf402 100644 (file)
@@ -127,6 +127,8 @@ static int parse_abi(int *check, const char *value)
 
        close(fd);
 
+       wait_for_delete();
+
        return ret;
 }