Skip to contentSkip to conversation

selftests/filesystems/mount-notify: fix unused result compiler warning

PATCH New root 1 participant 1 message Feb 1 Kselftest

lore
Share & tools
lore

root

author
#0 lore raw

PATCH 1/1 selftests/filesystems/mount-notify: fix unused result compiler warning

From: LJ 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(-)
tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c +1 -1
index 6381af6a40e3..a3ffc07d26e4 100644
@@ -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);
tools/testing/selftests/filesystems/mount-notify/mount-notify_test_ns.c +1 -1
index 320ee25dc8a5..0e85e49cb259 100644
@@ -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);
Signature · 1 line
2.52.0