From: LJ Fogelstrom <[email protected]>

Signed-off-by: L. J. Fogelstrom <[email protected]>
---
 .../selftests/filesystems/mount-notify/mount-notify_test.c      | 2 +-
 .../selftests/filesystems/mount-notify/mount-notify_test_ns.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c 
b/tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c
index 6381af6a40e3..a3ffc07d26e4 100644
--- a/tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c
+++ b/tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c
@@ -464,7 +464,7 @@ TEST_F(fanotify, rmdir)
        ASSERT_GE(ret, 0);
 
        if (ret == 0) {
-               chdir("/");
+               ASSERT_EQ(chdir("/"), 0);
                unshare(CLONE_NEWNS);
                mount("", "/", NULL, MS_REC|MS_PRIVATE, NULL);
                umount2("/a", MNT_DETACH);
diff --git 
a/tools/testing/selftests/filesystems/mount-notify/mount-notify_test_ns.c 
b/tools/testing/selftests/filesystems/mount-notify/mount-notify_test_ns.c
index 320ee25dc8a5..0e85e49cb259 100644
--- a/tools/testing/selftests/filesystems/mount-notify/mount-notify_test_ns.c
+++ b/tools/testing/selftests/filesystems/mount-notify/mount-notify_test_ns.c
@@ -491,7 +491,7 @@ TEST_F(fanotify, rmdir)
        ASSERT_GE(ret, 0);
 
        if (ret == 0) {
-               chdir("/");
+               ASSERT_EQ(chdir("/"), 0);
                unshare(CLONE_NEWNS);
                mount("", "/", NULL, MS_REC|MS_PRIVATE, NULL);
                umount2("/a", MNT_DETACH);
-- 
2.52.0


Reply via email to