All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] include/tst_test_macros.h: Add TST_EXP_PID and TST_EXP_PID_SILENT macros
@ 2021-04-19  2:38 ice_yangxiao
  2021-04-19  2:38 ` [LTP] [PATCH 2/2] syscalls/{wait401.c, waitpid01.c}: Take use of TST_EXP_PID_SILENT() ice_yangxiao
  2021-04-19  4:43 ` [LTP] [PATCH 1/2] include/tst_test_macros.h: Add TST_EXP_PID and TST_EXP_PID_SILENT macros Xiao Yang
  0 siblings, 2 replies; 3+ messages in thread
From: ice_yangxiao @ 2021-04-19  2:38 UTC (permalink / raw)
  To: ltp

From: Xiao Yang <yangx.jy@fujitsu.com>

Signed-off-by: Xiao Yang <yangx.jy@fujitsu.com>
---
 include/tst_test_macros.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/include/tst_test_macros.h b/include/tst_test_macros.h
index 189891507..101ac2c87 100644
--- a/include/tst_test_macros.h
+++ b/include/tst_test_macros.h
@@ -77,6 +77,17 @@ extern void *TST_RET_PTR;
 				#SCALL, ##__VA_ARGS__);                        \
 	} while (0)
 
+#define TST_EXP_PID_SILENT(SCALL, ...)	TST_EXP_FD_SILENT(SCALL, __VA_ARGS__)
+
+#define TST_EXP_PID(SCALL, ...)                                                \
+	do {                                                                   \
+		TST_EXP_PID_SILENT(SCALL, __VA_ARGS__);                        \
+									       \
+		if (TST_PASS)                                                  \
+			TST_MSGP_(TPASS, " returned pid %ld", TST_RET,         \
+				#SCALL, ##__VA_ARGS__);                        \
+	} while (0)
+
 #define TST_EXP_PASS_SILENT(SCALL, ...)                                        \
 	do {                                                                   \
 		TEST(SCALL);                                                   \
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-19  4:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-19  2:38 [LTP] [PATCH 1/2] include/tst_test_macros.h: Add TST_EXP_PID and TST_EXP_PID_SILENT macros ice_yangxiao
2021-04-19  2:38 ` [LTP] [PATCH 2/2] syscalls/{wait401.c, waitpid01.c}: Take use of TST_EXP_PID_SILENT() ice_yangxiao
2021-04-19  4:43 ` [LTP] [PATCH 1/2] include/tst_test_macros.h: Add TST_EXP_PID and TST_EXP_PID_SILENT macros Xiao Yang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.