* [LTP] [PATCH] include/tst_test_macros.h: Use TTERRNO for TST_EXP_FAIL() properly
@ 2021-03-17 13:26 ice_yangxiao
2021-03-17 13:59 ` Cyril Hrubis
0 siblings, 1 reply; 2+ messages in thread
From: ice_yangxiao @ 2021-03-17 13:26 UTC (permalink / raw)
To: ltp
From: Xiao Yang <yangx.jy@cn.fujitsu.com>
1) Remove TTERRNO if TST_RET == 0
2) Use TTERRNO if TST_RET == -1
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
include/tst_test_macros.h | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/include/tst_test_macros.h b/include/tst_test_macros.h
index 92cb5c66b..189891507 100644
--- a/include/tst_test_macros.h
+++ b/include/tst_test_macros.h
@@ -114,8 +114,7 @@ extern void *TST_RET_PTR;
TST_PASS = 0; \
\
if (TST_RET == 0) { \
- TST_MSG_(TFAIL | TTERRNO, " succeeded", \
- #SCALL, ##__VA_ARGS__); \
+ TST_MSG_(TFAIL, " succeeded", #SCALL, ##__VA_ARGS__); \
break; \
} \
\
@@ -127,11 +126,11 @@ extern void *TST_RET_PTR;
\
if (ERRNO) { \
if (TST_ERR == ERRNO) { \
- TST_MSG_(TPASS | TERRNO, "", \
+ TST_MSG_(TPASS | TTERRNO, "", \
#SCALL, ##__VA_ARGS__); \
TST_PASS = 1; \
} else { \
- TST_MSGP_(TFAIL | TERRNO, " expected %s", \
+ TST_MSGP_(TFAIL | TTERRNO, " expected %s", \
tst_strerrno(ERRNO), \
#SCALL, ##__VA_ARGS__); \
} \
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [LTP] [PATCH] include/tst_test_macros.h: Use TTERRNO for TST_EXP_FAIL() properly
2021-03-17 13:26 [LTP] [PATCH] include/tst_test_macros.h: Use TTERRNO for TST_EXP_FAIL() properly ice_yangxiao
@ 2021-03-17 13:59 ` Cyril Hrubis
0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2021-03-17 13:59 UTC (permalink / raw)
To: ltp
Hi!
Good catch, pushed, thanks.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-17 13:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-17 13:26 [LTP] [PATCH] include/tst_test_macros.h: Use TTERRNO for TST_EXP_FAIL() properly ice_yangxiao
2021-03-17 13:59 ` Cyril Hrubis
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.