diff mbox series

[1/2] include: Move stringification macros to tst_common.h

Message ID 20220831092036.20779-1-pvorel@suse.cz
State Accepted
Headers show
Series [1/2] include: Move stringification macros to tst_common.h | expand

Commit Message

Petr Vorel Aug. 31, 2022, 9:20 a.m. UTC
tst_common.h contains useful macros not directly related to test macros.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 include/tst_common.h      | 4 ++++
 include/tst_test_macros.h | 3 ---
 2 files changed, 4 insertions(+), 3 deletions(-)

Comments

Li Wang Sept. 2, 2022, 6:45 a.m. UTC | #1
Reviewed-by: Li Wang <liwang@redhat.com>
Petr Vorel Sept. 5, 2022, 4:10 p.m. UTC | #2
Hi Li,

thanks for your review, patchset merged.

Kind regards,
Petr
diff mbox series

Patch

diff --git a/include/tst_common.h b/include/tst_common.h
index fd7a900d4..520cca72c 100644
--- a/include/tst_common.h
+++ b/include/tst_common.h
@@ -83,4 +83,8 @@ 
 #define TST_RES_SUPPORTS_TCONF_TFAIL_TINFO_TPASS_TWARN(condition) \
 	TST_BUILD_BUG_ON(condition)
 
+/* stringification */
+#define TST_TO_STR_(s) #s
+#define TST_TO_STR(s) TST_TO_STR_(s)
+
 #endif /* TST_COMMON_H__ */
diff --git a/include/tst_test_macros.h b/include/tst_test_macros.h
index c8f7825c4..2e7b7871c 100644
--- a/include/tst_test_macros.h
+++ b/include/tst_test_macros.h
@@ -36,9 +36,6 @@  extern void *TST_RET_PTR;
 
 #define TST_2_(_1, _2, ...) _2
 
-#define TST_TO_STR_(s) #s
-#define TST_TO_STR(s) TST_TO_STR_(s)
-
 #define TST_FMT_(FMT, _1, ...) FMT, ##__VA_ARGS__
 
 #define TST_MSG_(RES, FMT, SCALL, ...) \