[LTP] [PATCH 05/19] tst_test_macros: Add TST_TOSTR macro
Cyril Hrubis
chrubis@suse.cz
Thu May 5 15:34:56 CEST 2022
Hi!
> Signed-off-by: Luke Nowakowski-Krijger <luke.nowakowskikrijger@canonical.com>
> ---
> include/tst_test_macros.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/include/tst_test_macros.h b/include/tst_test_macros.h
> index 2e7b7871c..f5d86c421 100644
> --- a/include/tst_test_macros.h
> +++ b/include/tst_test_macros.h
> @@ -36,6 +36,9 @@ extern void *TST_RET_PTR;
>
> #define TST_2_(_1, _2, ...) _2
>
> +#define _TST_TOSTR(STR) #STR
> +#define TST_TOSTR(STR) _TST_TOSTR(STR)
Just minor thing, anything starting with underscore is reserved for libc
and kernel. So we try to add the underscore at the end instead when
defining intemediate macros. This one should be TST_TO_STR_() instead.
> #define TST_FMT_(FMT, _1, ...) FMT, ##__VA_ARGS__
>
> #define TST_MSG_(RES, FMT, SCALL, ...) \
> --
> 2.32.0
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list