* [LTP] [PATCH 1/1] testinfo.pl: Fix array sort on old perl
@ 2021-05-13 18:20 Petr Vorel
2021-05-14 7:26 ` Cyril Hrubis
0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2021-05-13 18:20 UTC (permalink / raw)
To: ltp
From: Petr Vorel <petr.vorel@gmail.com>
It fixes failure on perl v5.16.3 (Centos 7):
Can't use an undefined value as an ARRAY reference at docparse/testinfo.pl line 427.
Fixes: 824e34034 ("docparse: Sort alphabetically tags in table")
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
docparse/testinfo.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docparse/testinfo.pl b/docparse/testinfo.pl
index 857278ac8..31148e3a4 100755
--- a/docparse/testinfo.pl
+++ b/docparse/testinfo.pl
@@ -424,7 +424,7 @@ sub content_all_tests
$tmp2 = undef;
my %commits;
- my @sorted_tags = sort { $a->[0] cmp $b->[0] } @{$json->{'tests'}{$name}{tags}};
+ my @sorted_tags = sort { $a->[0] cmp $b->[0] } @{$json->{'tests'}{$name}{tags} // []};
for my $tag (@sorted_tags) {
if (!defined($tmp2)) {
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [LTP] [PATCH 1/1] testinfo.pl: Fix array sort on old perl
2021-05-13 18:20 [LTP] [PATCH 1/1] testinfo.pl: Fix array sort on old perl Petr Vorel
@ 2021-05-14 7:26 ` Cyril Hrubis
2021-05-14 8:10 ` Petr Vorel
0 siblings, 1 reply; 3+ messages in thread
From: Cyril Hrubis @ 2021-05-14 7:26 UTC (permalink / raw)
To: ltp
Hi!
Looks good, acked.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 3+ messages in thread
* [LTP] [PATCH 1/1] testinfo.pl: Fix array sort on old perl
2021-05-14 7:26 ` Cyril Hrubis
@ 2021-05-14 8:10 ` Petr Vorel
0 siblings, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2021-05-14 8:10 UTC (permalink / raw)
To: ltp
Hi Cyril,
> Hi!
> Looks good, acked.
Thanks a lot, merged!
Kind regards,
Petr
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-14 8:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-13 18:20 [LTP] [PATCH 1/1] testinfo.pl: Fix array sort on old perl Petr Vorel
2021-05-14 7:26 ` Cyril Hrubis
2021-05-14 8: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.