All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/1] testinfo.pl: Properly handle NULL
Date: Thu, 9 Jan 2025 16:09:25 +0100	[thread overview]
Message-ID: <Z3_mpfCMSJVlUsrn@yuki.lan> (raw)
In-Reply-To: <20250109142847.326936-1-pvorel@suse.cz>

Hi!
> While at it, add missing comma to the arguments.
> 
> Fixes: 946d20bdaf ("metadata: metaparse: Better array parsing.")
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> NOTE: if we don't want to have NULL in the docs (see e.g. hugemmap10),
> we can simply filer it:

That is a question on how should be the save_restore formatted in the
docs. I guess that as a quick fix this is fine.

Acked-by: Cyril Hrubis <chrubis@suse.cz>

> $content .= paragraph(table_escape(join(', ', grep defined, @$v2)));
> 
>  docparse/testinfo.pl | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/docparse/testinfo.pl b/docparse/testinfo.pl
> index 78433c40a3..487b7d5f22 100755
> --- a/docparse/testinfo.pl
> +++ b/docparse/testinfo.pl
> @@ -408,7 +408,11 @@ sub content_all_tests
>  				# two dimensional array
>  				if (ref(@$v[0]) eq 'ARRAY') {
>  					for my $v2 (@$v) {
> -						$content .= paragraph(table_escape(join(' ', @$v2)));
> +						# convert NULL to "NULL" string to be printed
> +						for my $v3 (@$v2) {
> +							$v3 = "NULL" if (!defined $v3);
> +						}
> +						$content .= paragraph(table_escape(join(', ', @$v2)));
>  					}
>  				} else {
>  					# one dimensional array
> -- 
> 2.47.1
> 

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2025-01-09 15:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-09 14:28 [LTP] [PATCH 1/1] testinfo.pl: Properly handle NULL Petr Vorel
2025-01-09 14:31 ` Petr Vorel
2025-01-09 15:09 ` Cyril Hrubis [this message]
2025-01-09 16:10   ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z3_mpfCMSJVlUsrn@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.