From: Eric Wong Date: Fri, 7 Apr 2023 22:53:36 +0000 (+0000) Subject: t/sigfd: avoid multiple Sigfd instances X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e617216190c64754f7e95c3b386e6733e9b6e68c;p=thirdparty%2Fpublic-inbox.git t/sigfd: avoid multiple Sigfd instances This may fix sporadic test failures I've seen under FreeBSD 12.x when using kqueue with EVFILT_SIGNAL to emulate Linux signalfd. --- diff --git a/t/sigfd.t b/t/sigfd.t index 8fc8206c8..0070ca73a 100644 --- a/t/sigfd.t +++ b/t/sigfd.t @@ -23,6 +23,7 @@ SKIP: { for my $s (qw(HUP TERM INT WINCH)) { $sig->{$s} = sub { $hit->{$s}->{sigfd}++ }; } + PublicInbox::DS->Reset; my $sigfd = PublicInbox::Sigfd->new($sig, 0); if ($sigfd) { ok($sigfd, 'Sigfd->new works'); @@ -40,6 +41,7 @@ SKIP: { is($hit->{$s}->{normal}, undef, 'normal $SIG{$s} not fired'); } + PublicInbox::DS->Reset; $sigfd = undef; my $nbsig = PublicInbox::Sigfd->new($sig, 1);