* [PATCH 3/5] t/run: TEST_LEI_DAEMON_PERSIST: die if pid changes
2021-09-14 2:39 5% [PATCH 0/5] lei: TEST_LEI_DAEMON_PERSIST bugfixes Eric Wong
@ 2021-09-14 2:39 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-09-14 2:39 UTC (permalink / raw)
To: meta
While persisting lei-daemon across different test cases isn't
the default anymore, we can notice problems more quickly if
the daemon PID changes since the daemon gets auto-restarted
after failures.
---
t/run.perl | 3 +++
1 file changed, 3 insertions(+)
diff --git a/t/run.perl b/t/run.perl
index b0ee611a..e5ee0ade 100755
--- a/t/run.perl
+++ b/t/run.perl
@@ -254,5 +254,8 @@ for (my $i = $repeat; $i != 0; $i--) {
print $OLDOUT "1..".($repeat * scalar(@tests))."\n" if $repeat >= 0;
if ($lei_env && $$ == $owner_pid) {
my $opt = { 1 => $OLDOUT, 2 => $OLDERR };
+ my $cur_daemon_pid;
+ run_script([qw(lei daemon-pid)], $lei_env, { 1 => \$cur_daemon_pid });
run_script([qw(lei daemon-kill)], $lei_env, $opt);
+ DIE "lei daemon restarted\n" if $cur_daemon_pid != $lei_daemon_pid;
}
^ permalink raw reply related [relevance 7%]
* [PATCH 0/5] lei: TEST_LEI_DAEMON_PERSIST bugfixes
@ 2021-09-14 2:39 5% Eric Wong
2021-09-14 2:39 7% ` [PATCH 3/5] t/run: TEST_LEI_DAEMON_PERSIST: die if pid changes Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2021-09-14 2:39 UTC (permalink / raw)
To: meta
The 5/5 "lei up" fix has real-world implications if you're
using it in parallel. Otherwise, it's test-only stuff, and
`make check-run TEST_LEI_DAEMON_PERSIST=1 N=$(nproc)`
seems to fail or stall less often than before (but it
still can...).
(persisting the lei-daemon is around 5% faster with check-run)
Eric Wong (5):
lei: warn on event loop errors
lei: sto_done_request: add eval guard
t/run: TEST_LEI_DAEMON_PERSIST: die if pid changes
test_common: remove non-hidden files, first
lei up: fix env/cwd mismatches with multiple folders
lib/PublicInbox/LEI.pm | 33 ++++++++++++++++-----------------
lib/PublicInbox/LeiUp.pm | 15 +++++++--------
lib/PublicInbox/TestCommon.pm | 5 ++++-
t/run.perl | 3 +++
4 files changed, 30 insertions(+), 26 deletions(-)
^ permalink raw reply [relevance 5%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-09-14 2:39 5% [PATCH 0/5] lei: TEST_LEI_DAEMON_PERSIST bugfixes Eric Wong
2021-09-14 2:39 7% ` [PATCH 3/5] t/run: TEST_LEI_DAEMON_PERSIST: die if pid changes Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
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).