Skip to content

Commit e632a1c

Browse files
committed
test: fix ../ext/POSIX/t/sigset.t
1 parent 076ecd1 commit e632a1c

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

share/5.44-cosmo3.patch

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,37 @@ index 024c66a147..2741c895ed 100644
743743
is($oldaction->{FLAGS}, 0);
744744
}
745745

746+
diff --git a/ext/POSIX/t/sigset.t b/ext/POSIX/t/sigset.t
747+
index 864b4f528e..470a483997 100644
748+
--- a/ext/POSIX/t/sigset.t
749+
+++ b/ext/POSIX/t/sigset.t
750+
@@ -34,6 +34,7 @@ sub expected_signals {
751+
}
752+
}
753+
754+
+my @fillsetsigno;
755+
foreach (@POSIX::EXPORT) {
756+
next unless /^SIG[A-Z0-9]+$/;
757+
my $val = eval "POSIX::$_";
758+
@@ -41,6 +42,9 @@ foreach (@POSIX::EXPORT) {
759+
$min = $val if $min > $val;
760+
$max = $val if $max < $val;
761+
push @signo, $val;
762+
+ # Cosmopolitian doesn't allow adding these signals with sigfillset
763+
+ next if $^O eq 'cosmo' && /^(?:SIGTHR|SIGABRT|SIGKILL|SIGSTOP)$/;
764+
+ push @fillsetsigno, $val;
765+
}
766+
767+
# Sanity check that we found something:
768+
@@ -55,7 +59,7 @@ is($sigset->fillset(), '0 but true', 'fillset');
769+
# because on some systems, not all integers are valid signals...
770+
# so the only thing we can really be confident about is that all the signals
771+
# with names are going to be present:
772+
-foreach (@signo) {
773+
+foreach (@fillsetsigno) {
774+
cmp_ok($sigset->ismember($_), '==', 1, "after fillset sig $_ is a member");
775+
}
776+
is($sigset->emptyset(), '0 but true', 'empyset');
746777
diff --git a/hints/cosmo.sh b/hints/cosmo.sh
747778
new file mode 100644
748779
index 0000000000..72058dddbf

0 commit comments

Comments
 (0)