]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
t/sigfd: avoid multiple Sigfd instances
authorEric Wong <e@80x24.org>
Fri, 7 Apr 2023 22:53:36 +0000 (22:53 +0000)
committerEric Wong <e@80x24.org>
Fri, 7 Apr 2023 22:53:58 +0000 (22:53 +0000)
This may fix sporadic test failures I've seen under FreeBSD 12.x
when using kqueue with EVFILT_SIGNAL to emulate Linux signalfd.

t/sigfd.t

index 8fc8206c8d6162b6fc3f94c380a8fb6015cdccd3..0070ca73a843900eba0f3f9beba9d00ed6c4b943 100644 (file)
--- 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);