[LTP] [PATCH 16/19] Unify error handling in include/tst_safe_posix_ipc.h

Martin Doucha mdoucha@suse.cz
Mon Oct 26 17:47:53 CET 2020


- Properly format caller file:line location

Signed-off-by: Martin Doucha <mdoucha@suse.cz>
---
 include/tst_safe_posix_ipc.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/tst_safe_posix_ipc.h b/include/tst_safe_posix_ipc.h
index d74ef4ee8..b60c12c9e 100644
--- a/include/tst_safe_posix_ipc.h
+++ b/include/tst_safe_posix_ipc.h
@@ -36,9 +36,11 @@ static inline int safe_mq_open(const char *file, const int lineno,
 	va_end(ap);
 
 	rval = mq_open(pathname, oflags, mode, attr);
+
 	if (rval == -1) {
-		tst_brk(TBROK | TERRNO, "%s:%d: mq_open(%s,%d,0%o,%p) failed",
-			 file, lineno, pathname, oflags, mode, attr);
+		tst_brk_(file, lineno, TBROK | TERRNO,
+			"mq_open(%s,%d,%04o,%p) failed", pathname, oflags,
+			mode, attr);
 	}
 
 	return rval;
-- 
2.28.0



More information about the ltp mailing list