user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
* test: 'seen set from rename' potentially racy
@ 2021-11-04 13:43 Konstantin Ryabitsev
  2021-11-04 18:51 ` Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Ryabitsev @ 2021-11-04 13:43 UTC (permalink / raw)
  To: meta

Hello:

I was having some trouble using "make check" on the Fedora build system:

#   Failed test 'seen set from rename'
#   at t/lei-watch.t line 61.
#                   '/tmp/pi-lei-watch-11080-FYz2/lei-daemon/md2/cur/9bf1002c49eb075df47247b74d69bcd555e23422=99:2,'
#     doesn't match '(?^:S\z)'
# [
#   '/tmp/pi-lei-watch-11080-FYz2/lei-daemon/md2/cur/9bf1002c49eb075df47247b74d69bcd555e23422=99:2,'
# ]

This wasn't happening in my own chroot builds, so I'm suspecting that the
faster system on the Fedora build infra side is causing this failure,
therefore perhaps some kind of race condition. 

You can see the entire log here:

https://download.copr.fedorainfracloud.org/results/icon/b4/fedora-35-x86_64/02928611-public-inbox/build.log.gz

Switching to "make test" seems to help, which is what I've done for now.

Cheers,
-K

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: test: 'seen set from rename' potentially racy
  2021-11-04 13:43 test: 'seen set from rename' potentially racy Konstantin Ryabitsev
@ 2021-11-04 18:51 ` Eric Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2021-11-04 18:51 UTC (permalink / raw)
  To: Konstantin Ryabitsev; +Cc: meta

Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote:
> Hello:
> 
> I was having some trouble using "make check" on the Fedora build system:
> 
> #   Failed test 'seen set from rename'
> #   at t/lei-watch.t line 61.
> #                   '/tmp/pi-lei-watch-11080-FYz2/lei-daemon/md2/cur/9bf1002c49eb075df47247b74d69bcd555e23422=99:2,'
> #     doesn't match '(?^:S\z)'
> # [
> #   '/tmp/pi-lei-watch-11080-FYz2/lei-daemon/md2/cur/9bf1002c49eb075df47247b74d69bcd555e23422=99:2,'
> # ]
> 
> This wasn't happening in my own chroot builds, so I'm suspecting that the
> faster system on the Fedora build infra side is causing this failure,
> therefore perhaps some kind of race condition. 

Hmm, I thought I fixed it...  Does increasing the tick sleep time help?

diff --git a/t/lei-watch.t b/t/lei-watch.t
index 9158571c..8126b707 100644
--- a/t/lei-watch.t
+++ b/t/lei-watch.t
@@ -49,13 +49,13 @@ test_lei(sub {
 	lei_ok 'ls-watch';
 	like($lei_out, qr/^\Qmaildir:$md\E$/sm, 'maildir shown');
 	lei_ok qw(q mid:testmessage@example.com -o), $md, '-I', "$ro_home/t1";
 	my @f = glob("$md/cur/*:2,");
 	is(scalar(@f), 1, 'got populated maildir with one result');
 	rename($f[0], "$f[0]S") or xbail "rename $!"; # set (S)een
-	tick($have_fast_inotify ? 0.1 : 2.1); # always needed for 1 CPU systems
+	tick($have_fast_inotify ? 1 : 5); # always needed for 1 CPU systems
 	lei_ok qw(note-event done); # flushes immediately (instead of 5s)
 
 	lei_ok qw(q mid:testmessage@example.com -o), $md2, '-I', "$ro_home/t1";
 	my @f2 = glob("$md2/*/*");
 	is(scalar(@f2), 1, 'got one result');
 	like($f2[0], qr/S\z/, 'seen set from rename') or diag explain(\@f2);

Maybe 1s is too much and 0.2s is enough.

> https://download.copr.fedorainfracloud.org/results/icon/b4/fedora-35-x86_64/02928611-public-inbox/build.log.gz

"prove --state=save -bvw -j3", so 2 cores?  Any idea what
CONFIG_HZ is on that system?

> Switching to "make test" seems to help, which is what I've done for now.

OK, so it could be load related.  There could probably be a way
to "subscribe" for updates to lei-daemon so sleeping wouldn't be
necessary.  I'll see abouit it next week, got some other stuff
to take care of...

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-04 18:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-04 13:43 test: 'seen set from rename' potentially racy Konstantin Ryabitsev
2021-11-04 18:51 ` Eric Wong

Code repositories for project(s) associated with this 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).