* [PATCH 0/2] some CentOS fixes
@ 2023-11-15 1:04 Eric Wong
2023-11-15 1:04 ` [PATCH 1/2] lei: use -signal numbers for old Perl Eric Wong
2023-11-15 1:04 ` [PATCH 2/2] t/lei-import: account for more verbose error Eric Wong
0 siblings, 2 replies; 3+ messages in thread
From: Eric Wong @ 2023-11-15 1:04 UTC (permalink / raw)
To: meta
Neither of these fix the t/cindex.t stuck problem Konstantin is
encountering, though...
Eric Wong (2):
lei: use -signal numbers for old Perl
t/lei-import: account for more verbose error
lib/PublicInbox/LEI.pm | 2 +-
lib/PublicInbox/LeiXSearch.pm | 2 +-
t/lei-import.t | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] lei: use -signal numbers for old Perl
2023-11-15 1:04 [PATCH 0/2] some CentOS fixes Eric Wong
@ 2023-11-15 1:04 ` Eric Wong
2023-11-15 1:04 ` [PATCH 2/2] t/lei-import: account for more verbose error Eric Wong
1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2023-11-15 1:04 UTC (permalink / raw)
To: meta
Unlike modern Perls, Perl 5.16.3 on CentOS doesn't accept
negative string signals like "-TERM" .
This only became a problem since commit b231d91f42d7
(treewide: enable warnings in all exec-ed processes)
made our code stricter by enabling more warnings.
In both cases, the kill is probably unnecessary and safe
to remove since we can rely on closing sockets to drop
processes.
---
lib/PublicInbox/LEI.pm | 2 +-
lib/PublicInbox/LeiXSearch.pm | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm
index 77acb5a1..69065ce7 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -474,7 +474,7 @@ my @WQ_KEYS = qw(lxs l2m ikw pmd wq1 lne v2w); # internal workers
sub _drop_wq {
my ($self) = @_;
for my $wq (grep(defined, delete(@$self{@WQ_KEYS}))) {
- $wq->wq_kill('-TERM');
+ $wq->wq_kill(-POSIX::SIGTERM());
$wq->DESTROY;
}
}
diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm
index b09c2462..e85fd3c4 100644
--- a/lib/PublicInbox/LeiXSearch.pm
+++ b/lib/PublicInbox/LeiXSearch.pm
@@ -437,7 +437,7 @@ sub do_post_augment {
my $err = $@;
if ($err) {
if (my $lxs = delete $lei->{lxs}) {
- $lxs->wq_kill('-TERM');
+ $lxs->wq_kill(-POSIX::SIGTERM());
$lxs->wq_close;
}
$lei->fail("$err");
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] t/lei-import: account for more verbose error
2023-11-15 1:04 [PATCH 0/2] some CentOS fixes Eric Wong
2023-11-15 1:04 ` [PATCH 1/2] lei: use -signal numbers for old Perl Eric Wong
@ 2023-11-15 1:04 ` Eric Wong
1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2023-11-15 1:04 UTC (permalink / raw)
To: meta
Perl 5.16.3 on CentOS seems more verbose in one of the EIO
tests. Relax the regexp so we can account for extra errors
reported by Perl.
---
t/lei-import.t | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/lei-import.t b/t/lei-import.t
index bd562617..b4446b56 100644
--- a/t/lei-import.t
+++ b/t/lei-import.t
@@ -172,12 +172,12 @@ SKIP: {
tick; # wait for strace to attach
ok(!lei(qw(import -F eml t/plack-qp.eml)),
'-F eml import fails on pathname error injection');
- like($lei_err, qr!error reading t/plack-qp\.eml: Input/output error!,
+ like($lei_err, qr!error reading t/plack-qp\.eml: .*Input/output error!,
'EIO noted in stderr');
open $fh, '<', 't/plack-qp.eml';
ok(!lei(qw(import -F eml -), undef, { %$lei_opt, 0 => $fh }),
'-F eml import fails on stdin error injection');
- like($lei_err, qr!error reading .*?: Input/output error!,
+ like($lei_err, qr!error reading .*?: .*Input/output error!,
'EIO noted in stderr');
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-15 1:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-15 1:04 [PATCH 0/2] some CentOS fixes Eric Wong
2023-11-15 1:04 ` [PATCH 1/2] lei: use -signal numbers for old Perl Eric Wong
2023-11-15 1:04 ` [PATCH 2/2] t/lei-import: account for more verbose error 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).