about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-09-04 10:36:00 +0000
committerEric Wong <e@80x24.org>2023-09-05 03:01:37 +0000
commit60b0467f838fe712f28880aa3f902991950f6361 (patch)
tree8a6d151cd55f71e273538bd6b0c4060df86d1421
parent1154986c75f8baf9a6212754cf1a4a29bfd507ee (diff)
downloadpublic-inbox-60b0467f838fe712f28880aa3f902991950f6361.tar.gz
Check to ensure there's a numeric value of SIGWINCH defined for
the given platform.  SIGWINCH may also fire while the test is
running due to a user resizing their terminal, so a boolean test
to ensure it fired rather than an exact value check is more
correct.
-rw-r--r--t/sigfd.t3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/sigfd.t b/t/sigfd.t
index 15fc818a..f6449dab 100644
--- a/t/sigfd.t
+++ b/t/sigfd.t
@@ -28,6 +28,7 @@ SKIP: {
         kill 'USR2', $$ or die "kill $!";
         ok(!defined($hit->{USR2}), 'no USR2 yet') or diag explain($hit);
         PublicInbox::DS->Reset;
+        ok($PublicInbox::Syscall::SIGNUM{WINCH}, 'SIGWINCH number defined');
         my $sigfd = PublicInbox::Sigfd->new($sig, 0);
         if ($sigfd) {
                 $linux_sigfd = 1 if $^O eq 'linux';
@@ -71,7 +72,7 @@ SKIP: {
                 PublicInbox::DS->Reset;
                 is($hit->{TERM}->{sigfd}, 1, 'TERM sigfd fired in event loop');
                 is($hit->{HUP}->{sigfd}, 3, 'HUP sigfd fired in event loop');
-                is($hit->{WINCH}->{sigfd}, 1, 'WINCH sigfd fired in event loop');
+                ok($hit->{WINCH}->{sigfd}, 'WINCH sigfd fired in event loop');
         } else {
                 skip('signalfd disabled?', 10);
         }