* [LTP] [PATCH 1/2] include: Move stringification macros to tst_common.h
@ 2022-08-31 9:20 Petr Vorel
2022-08-31 9:20 ` [LTP] [PATCH 2/2] doc: Document macros for stringification Petr Vorel
2022-09-02 6:45 ` [LTP] [PATCH 1/2] include: Move stringification macros to tst_common.h Li Wang
0 siblings, 2 replies; 5+ messages in thread
From: Petr Vorel @ 2022-08-31 9:20 UTC (permalink / raw)
To: ltp
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(-)
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, ...) \
--
2.37.2
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [LTP] [PATCH 2/2] doc: Document macros for stringification
2022-08-31 9:20 [LTP] [PATCH 1/2] include: Move stringification macros to tst_common.h Petr Vorel
@ 2022-08-31 9:20 ` Petr Vorel
2022-09-02 6:45 ` Li Wang
2022-09-02 6:45 ` [LTP] [PATCH 1/2] include: Move stringification macros to tst_common.h Li Wang
1 sibling, 1 reply; 5+ messages in thread
From: Petr Vorel @ 2022-08-31 9:20 UTC (permalink / raw)
To: ltp
Also note header which define useful macros (hint for users).
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
doc/c-test-api.txt | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/doc/c-test-api.txt b/doc/c-test-api.txt
index 9db4579da..03126304a 100644
--- a/doc/c-test-api.txt
+++ b/doc/c-test-api.txt
@@ -837,6 +837,8 @@ start for you. See 'testcases/kernel/device-drivers/block' for details.
1.12 Useful macros
~~~~~~~~~~~~~~~~~~
+These macros are defined in 'include/tst_common.h'.
+
[source,c]
-------------------------------------------------------------------------------
ARRAY_SIZE(arr)
@@ -852,6 +854,14 @@ LTP_ALIGN(x, a)
Aligns the x to be next multiple of a. The a must be power of 2.
+[source,c]
+-------------------------------------------------------------------------------
+TST_TO_STR(s) /* stringification */
+TST_TO_STR_(s) /* macro expansion */
+-------------------------------------------------------------------------------
+
+Macros for stringification.
+
1.13 Filesystem type detection and skiplist
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
2.37.2
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH 1/2] include: Move stringification macros to tst_common.h
2022-08-31 9:20 [LTP] [PATCH 1/2] include: Move stringification macros to tst_common.h Petr Vorel
2022-08-31 9:20 ` [LTP] [PATCH 2/2] doc: Document macros for stringification Petr Vorel
@ 2022-09-02 6:45 ` Li Wang
2022-09-05 16:10 ` Petr Vorel
1 sibling, 1 reply; 5+ messages in thread
From: Li Wang @ 2022-09-02 6:45 UTC (permalink / raw)
To: Petr Vorel; +Cc: LTP List
[-- Attachment #1.1: Type: text/plain, Size: 64 bytes --]
Reviewed-by: Li Wang <liwang@redhat.com>
--
Regards,
Li Wang
[-- Attachment #1.2: Type: text/html, Size: 472 bytes --]
[-- Attachment #2: Type: text/plain, Size: 60 bytes --]
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH 2/2] doc: Document macros for stringification
2022-08-31 9:20 ` [LTP] [PATCH 2/2] doc: Document macros for stringification Petr Vorel
@ 2022-09-02 6:45 ` Li Wang
0 siblings, 0 replies; 5+ messages in thread
From: Li Wang @ 2022-09-02 6:45 UTC (permalink / raw)
To: Petr Vorel; +Cc: LTP List
[-- Attachment #1.1: Type: text/plain, Size: 41 bytes --]
Reviewed-by: Li Wang <liwang@redhat.com>
[-- Attachment #1.2: Type: text/html, Size: 250 bytes --]
[-- Attachment #2: Type: text/plain, Size: 60 bytes --]
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH 1/2] include: Move stringification macros to tst_common.h
2022-09-02 6:45 ` [LTP] [PATCH 1/2] include: Move stringification macros to tst_common.h Li Wang
@ 2022-09-05 16:10 ` Petr Vorel
0 siblings, 0 replies; 5+ messages in thread
From: Petr Vorel @ 2022-09-05 16:10 UTC (permalink / raw)
To: Li Wang; +Cc: LTP List
Hi Li,
thanks for your review, patchset merged.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-09-05 16:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-31 9:20 [LTP] [PATCH 1/2] include: Move stringification macros to tst_common.h Petr Vorel
2022-08-31 9:20 ` [LTP] [PATCH 2/2] doc: Document macros for stringification Petr Vorel
2022-09-02 6:45 ` Li Wang
2022-09-02 6:45 ` [LTP] [PATCH 1/2] include: Move stringification macros to tst_common.h Li Wang
2022-09-05 16:10 ` Petr Vorel
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.