* c1b912dea25 breaks make test on CentOS7
@ 2021-04-20 17:49 Konstantin Ryabitsev
2021-04-20 19:02 ` [PATCH 0/2] CentOS 7 fixes Eric Wong
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Konstantin Ryabitsev @ 2021-04-20 17:49 UTC (permalink / raw)
To: meta
Something I noticed today:
$ make test
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/address.t .................. ok
t/admin.t .................... Warning: Use of "ref" without parentheses is ambiguous at /usr/local/share/public-inbox/blib/lib/PublicInbox/TestCommon.pm line 28.
Use of ?PATTERN? without explicit operator is deprecated at /usr/local/share/public-inbox/blib/lib/PublicInbox/TestCommon.pm line 28.
Global symbol "$path" requires explicit package name at /usr/local/share/public-inbox/blib/lib/PublicInbox/TestCommon.pm line 28.
Global symbol "$cb" requires explicit package name at /usr/local/share/public-inbox/blib/lib/PublicInbox/TestCommon.pm line 28.
[...]
/usr/local/share/public-inbox/blib/lib/PublicInbox/TestCommon.pm has too many errors.
Compilation failed in require at t/config.t line 7.
BEGIN failed--compilation aborted at t/config.t line 7.
t/config.t ................... Dubious, test returned 255 (wstat 65280, 0xff00)
Backing up to 64b1ce9f94127fc144d6205bb572fe43b4b552c2 makes tests pass.
$ perl --version
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
(with 44 registered patches, see perl -V for more detail)
Best,
-K
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 0/2] CentOS 7 fixes
2021-04-20 17:49 c1b912dea25 breaks make test on CentOS7 Konstantin Ryabitsev
@ 2021-04-20 19:02 ` Eric Wong
2021-04-20 19:17 ` Konstantin Ryabitsev
2021-04-20 19:02 ` [PATCH 1/2] test_common: fix xbail for Perl 5.16 Eric Wong
2021-04-20 19:02 ` [PATCH 2/2] lei_query: avoid POSIX::lround for older Perls Eric Wong
2 siblings, 1 reply; 5+ messages in thread
From: Eric Wong @ 2021-04-20 19:02 UTC (permalink / raw)
To: meta
Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote:
> t/admin.t .................... Warning: Use of "ref" without parentheses is ambiguous at /usr/local/share/public-inbox/blib/lib/PublicInbox/TestCommon.pm line 28.
> Use of ?PATTERN? without explicit operator is deprecated at /usr/local/share/public-inbox/blib/lib/PublicInbox/TestCommon.pm line 28.
> Global symbol "$path" requires explicit package name at /usr/local/share/public-inbox/blib/lib/PublicInbox/TestCommon.pm line 28.
> Global symbol "$cb" requires explicit package name at /usr/local/share/public-inbox/blib/lib/PublicInbox/TestCommon.pm line 28.
>
> Backing up to 64b1ce9f94127fc144d6205bb572fe43b4b552c2 makes tests pass.
Oops, 1/2 should fix it. Thanks for the report.
I also noticed lei was totally broken once I tried a more recent git.
Eric Wong (2):
test_common: fix xbail for Perl 5.16
lei_query: avoid POSIX::lround for older Perls
lib/PublicInbox/LeiQuery.pm | 6 ++----
lib/PublicInbox/TestCommon.pm | 2 +-
2 files changed, 3 insertions(+), 5 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] test_common: fix xbail for Perl 5.16
2021-04-20 17:49 c1b912dea25 breaks make test on CentOS7 Konstantin Ryabitsev
2021-04-20 19:02 ` [PATCH 0/2] CentOS 7 fixes Eric Wong
@ 2021-04-20 19:02 ` Eric Wong
2021-04-20 19:02 ` [PATCH 2/2] lei_query: avoid POSIX::lround for older Perls Eric Wong
2 siblings, 0 replies; 5+ messages in thread
From: Eric Wong @ 2021-04-20 19:02 UTC (permalink / raw)
To: meta
Our use of `ref' was triggering ambiguity in older versions of
the Perl parser.
Reported-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Link: https://public-inbox.org/meta/20210420174912.h6d2yv7zu5xr4yfc@nitro.local/
---
lib/PublicInbox/TestCommon.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm
index 2627871a..67fe6336 100644
--- a/lib/PublicInbox/TestCommon.pm
+++ b/lib/PublicInbox/TestCommon.pm
@@ -25,7 +25,7 @@ BEGIN {
push @EXPORT, @methods;
}
-sub xbail (@) { BAIL_OUT join(' ', map { ref ? (explain($_)) : ($_) } @_) }
+sub xbail (@) { BAIL_OUT join(' ', map { ref() ? (explain($_)) : ($_) } @_) }
sub eml_load ($) {
my ($path, $cb) = @_;
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] lei_query: avoid POSIX::lround for older Perls
2021-04-20 17:49 c1b912dea25 breaks make test on CentOS7 Konstantin Ryabitsev
2021-04-20 19:02 ` [PATCH 0/2] CentOS 7 fixes Eric Wong
2021-04-20 19:02 ` [PATCH 1/2] test_common: fix xbail for Perl 5.16 Eric Wong
@ 2021-04-20 19:02 ` Eric Wong
2 siblings, 0 replies; 5+ messages in thread
From: Eric Wong @ 2021-04-20 19:02 UTC (permalink / raw)
To: meta
POSIX.pm shipped with Perl 5.16.3 did not support lround,
at least. So just rely on built-in core functions.
---
lib/PublicInbox/LeiQuery.pm | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/PublicInbox/LeiQuery.pm b/lib/PublicInbox/LeiQuery.pm
index 385ba0a9..f51dc93b 100644
--- a/lib/PublicInbox/LeiQuery.pm
+++ b/lib/PublicInbox/LeiQuery.pm
@@ -5,7 +5,6 @@
package PublicInbox::LeiQuery;
use strict;
use v5.10.1;
-use POSIX ();
sub prep_ext { # externals_each callback
my ($lxs, $exclude, $loc) = @_;
@@ -22,7 +21,7 @@ sub _start_query { # used by "lei q" and "lei up"
}
my $lxs = $self->{lxs};
$xj ||= $lxs->concurrency($opt); # allow: "--jobs ,$WRITER_ONLY"
- my $nproc = $lxs->detect_nproc // 1; # don't memoize, schedtool(1) exists
+ my $nproc = $lxs->detect_nproc || 1; # don't memoize, schedtool(1) exists
$xj = $nproc if $xj > $nproc;
$lxs->{-wq_nr_workers} = $xj;
if (defined($mj) && $mj !~ /\A[1-9][0-9]*\z/) {
@@ -36,8 +35,7 @@ sub _start_query { # used by "lei q" and "lei up"
$self->_lei_store(1)->write_prepare($self);
}
$l2m and $l2m->{-wq_nr_workers} = $mj // do {
- $mj = POSIX::lround($nproc * 3 / 4); # keep some CPU for git
- $mj <= 0 ? 1 : $mj;
+ $mj = int($nproc * 0.75 + 0.5); # keep some CPU for git
};
# descending docid order is cheapest, MUA controls sorting order
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] CentOS 7 fixes
2021-04-20 19:02 ` [PATCH 0/2] CentOS 7 fixes Eric Wong
@ 2021-04-20 19:17 ` Konstantin Ryabitsev
0 siblings, 0 replies; 5+ messages in thread
From: Konstantin Ryabitsev @ 2021-04-20 19:17 UTC (permalink / raw)
To: Eric Wong; +Cc: meta
On Wed, Apr 21, 2021 at 12:02:04AM +0500, Eric Wong wrote:
> Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote:
> > t/admin.t .................... Warning: Use of "ref" without parentheses is ambiguous at /usr/local/share/public-inbox/blib/lib/PublicInbox/TestCommon.pm line 28.
> > Use of ?PATTERN? without explicit operator is deprecated at /usr/local/share/public-inbox/blib/lib/PublicInbox/TestCommon.pm line 28.
> > Global symbol "$path" requires explicit package name at /usr/local/share/public-inbox/blib/lib/PublicInbox/TestCommon.pm line 28.
> > Global symbol "$cb" requires explicit package name at /usr/local/share/public-inbox/blib/lib/PublicInbox/TestCommon.pm line 28.
> >
> > Backing up to 64b1ce9f94127fc144d6205bb572fe43b4b552c2 makes tests pass.
>
> Oops, 1/2 should fix it. Thanks for the report.
> I also noticed lei was totally broken once I tried a more recent git.
Yep, looks good now:
All tests successful.
Files=142, Tests=4981, 93 wallclock secs ( 0.88 usr 0.20 sys + 48.86 cusr 29.54 csys = 79.48 CPU)
Result: PASS
Thanks!
-K
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-04-20 19:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-20 17:49 c1b912dea25 breaks make test on CentOS7 Konstantin Ryabitsev
2021-04-20 19:02 ` [PATCH 0/2] CentOS 7 fixes Eric Wong
2021-04-20 19:17 ` Konstantin Ryabitsev
2021-04-20 19:02 ` [PATCH 1/2] test_common: fix xbail for Perl 5.16 Eric Wong
2021-04-20 19:02 ` [PATCH 2/2] lei_query: avoid POSIX::lround for older Perls Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).