diff options
author | Eric Wong <e@80x24.org> | 2023-09-04 10:36:00 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-09-05 03:01:37 +0000 |
commit | 60b0467f838fe712f28880aa3f902991950f6361 (patch) | |
tree | 8a6d151cd55f71e273538bd6b0c4060df86d1421 | |
parent | 1154986c75f8baf9a6212754cf1a4a29bfd507ee (diff) | |
download | public-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.t | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); } |