diff options
author | Beau Belgrave <beaub@linux.microsoft.com> | 2023-09-16 01:27:54 +0300 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2023-09-18 20:04:52 +0300 |
commit | 8ed99af4a266a3492d773b5d85c3f8e9f81254b6 (patch) | |
tree | 3cb2552e304b8529468c45140baa76d995312f24 /tools/testing/selftests/user_events/dyn_test.c | |
parent | ce9ecca0238b140b88f43859b211c9fdfd8e5b70 (diff) | |
download | linux-8ed99af4a266a3492d773b5d85c3f8e9f81254b6.tar.xz |
selftests/user_events: Fix to unmount tracefs when test created mount
Fix to unmount tracefs if the self-test mounted it to allow testing.
If tracefs was already mounted, this does nothing.
Suggested-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/all/29fce076-746c-4650-8358-b4e0fa215cf7@sirena.org.uk/
Fixes: a06023a8f78d ("selftests/user_events: Fix failures when user_events is not installed")
Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/user_events/dyn_test.c')
-rw-r--r-- | tools/testing/selftests/user_events/dyn_test.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/testing/selftests/user_events/dyn_test.c b/tools/testing/selftests/user_events/dyn_test.c index 32c827a52d7d..a85980190bea 100644 --- a/tools/testing/selftests/user_events/dyn_test.c +++ b/tools/testing/selftests/user_events/dyn_test.c @@ -144,13 +144,16 @@ do { \ FIXTURE(user) { int check; + bool umount; }; FIXTURE_SETUP(user) { - USER_EVENT_FIXTURE_SETUP(return); + USER_EVENT_FIXTURE_SETUP(return, self->umount); } FIXTURE_TEARDOWN(user) { + USER_EVENT_FIXTURE_TEARDOWN(self->umount); + wait_for_delete(); } |