* [LTP] [PATCH] metadata: Ignore system macros
@ 2021-11-05 14:04 Cyril Hrubis
2021-11-05 14:11 ` Petr Vorel
2021-11-05 14:24 ` Richard Palethorpe
0 siblings, 2 replies; 4+ messages in thread
From: Cyril Hrubis @ 2021-11-05 14:04 UTC (permalink / raw)
To: ltp
Ingore all macros that start with underscore. Unless we do that we get
several thousands of __NR_foo macros and the hash table cannot keep up.
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
metadata/metaparse.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/metadata/metaparse.c b/metadata/metaparse.c
index b38550550..f71d8628d 100644
--- a/metadata/metaparse.c
+++ b/metadata/metaparse.c
@@ -624,6 +624,9 @@ static void parse_macro(FILE *f)
macro_get_val(f, val, sizeof(val));
+ if (name[0] == '_')
+ return;
+
ENTRY e = {
.key = strdup(name),
.data = strdup(val),
--
2.32.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] metadata: Ignore system macros
2021-11-05 14:04 [LTP] [PATCH] metadata: Ignore system macros Cyril Hrubis
@ 2021-11-05 14:11 ` Petr Vorel
2021-11-05 14:28 ` Cyril Hrubis
2021-11-05 14:24 ` Richard Palethorpe
1 sibling, 1 reply; 4+ messages in thread
From: Petr Vorel @ 2021-11-05 14:11 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Hi Cyril,
> Ingore all macros that start with underscore. Unless we do that we get
> several thousands of __NR_foo macros and the hash table cannot keep up.
> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Good catch. Suppose skipping many tests does not need print info under verbose.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] metadata: Ignore system macros
2021-11-05 14:04 [LTP] [PATCH] metadata: Ignore system macros Cyril Hrubis
2021-11-05 14:11 ` Petr Vorel
@ 2021-11-05 14:24 ` Richard Palethorpe
1 sibling, 0 replies; 4+ messages in thread
From: Richard Palethorpe @ 2021-11-05 14:24 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Hello,
Cyril Hrubis <chrubis@suse.cz> writes:
> Ingore all macros that start with underscore. Unless we do that we get
> several thousands of __NR_foo macros and the hash table cannot keep up.
>
> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Reviewed-by: Richard Palethorpe <rpalethorpe@suse.com>
> ---
> metadata/metaparse.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/metadata/metaparse.c b/metadata/metaparse.c
> index b38550550..f71d8628d 100644
> --- a/metadata/metaparse.c
> +++ b/metadata/metaparse.c
> @@ -624,6 +624,9 @@ static void parse_macro(FILE *f)
>
> macro_get_val(f, val, sizeof(val));
>
> + if (name[0] == '_')
> + return;
> +
> ENTRY e = {
> .key = strdup(name),
> .data = strdup(val),
> --
> 2.32.0
--
Thank you,
Richard.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] metadata: Ignore system macros
2021-11-05 14:11 ` Petr Vorel
@ 2021-11-05 14:28 ` Cyril Hrubis
0 siblings, 0 replies; 4+ messages in thread
From: Cyril Hrubis @ 2021-11-05 14:28 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp
Hi!
Thank you both for the quick review, pushed.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-11-05 14:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-05 14:04 [LTP] [PATCH] metadata: Ignore system macros Cyril Hrubis
2021-11-05 14:11 ` Petr Vorel
2021-11-05 14:28 ` Cyril Hrubis
2021-11-05 14:24 ` Richard Palethorpe
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.