diff mbox series

[COMMITTED] safe_mount: tolerate the realpath fails

Message ID 20230616094059.165814-1-liwang@redhat.com
State Accepted
Headers show
Series [COMMITTED] safe_mount: tolerate the realpath fails | expand

Commit Message

Li Wang June 16, 2023, 9:40 a.m. UTC
realpath() failure is not a fatal error in safe_mount,
it's safe to tolerate them.

Follow-up-fix: 3490c2842b93bbde71168d8598d06f15ea5d4010
Signed-off-by: Li Wang <liwang@redhat.com>
---
 lib/safe_macros.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/lib/safe_macros.c b/lib/safe_macros.c
index 037eb0e62..951e1b064 100644
--- a/lib/safe_macros.c
+++ b/lib/safe_macros.c
@@ -905,7 +905,7 @@  int safe_mount(const char *file, const int lineno, void (*cleanup_fn)(void),
 			"Mounting %s to %s fstyp=%s flags=%lx",
 			source, mpath, filesystemtype, mountflags);
 	} else {
-		tst_brkm_(file, lineno, TBROK | TERRNO, cleanup_fn,
+		tst_resm_(file, lineno, TINFO | TERRNO,
 			"Cannot resolve the absolute path of %s", target);
 	}
 	/*
@@ -962,7 +962,7 @@  int safe_umount(const char *file, const int lineno, void (*cleanup_fn)(void),
 	if (realpath(target, mpath)) {
 		tst_resm_(file, lineno, TINFO, "Umounting %s", mpath);
 	} else {
-		tst_brkm_(file, lineno, TBROK | TERRNO, cleanup_fn,
+		tst_resm_(file, lineno, TINFO | TERRNO,
 			"Cannot resolve the absolute path of %s", target);
 	}