Skip to content

Commit 532dec0

Browse files
committed
tests/posix/exec_sigmask: Make portable
The test was Linux-only, and didn't pass on at least mips64el due to a different signal mask size. The new version should be fully portable, but will hang forever on failure. Link: https://buildd.debian.org/status/fetch.php?pkg=bfs&arch=mips64el&ver=4.0.5-1&stamp=1737761227&raw=0
1 parent d33271c commit 532dec0

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

tests/posix/exec_sigmask.sh

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
# Regression test: restore the signal mask after fork()
22

3-
test "$UNAME" = "Linux" || skip
4-
bfs_diff /proc/self/status -exec grep '^SigBlk:' {} +
3+
cd "$TEST"
4+
mkfifo p1 p2
5+
6+
{
7+
# Get the PID of `sh`
8+
read -r pid <p1
9+
# Send SIGTERM -- this will hang forever if signals are blocked
10+
kill $pid
11+
} &
12+
13+
# Write the `sh` PID to p1, then hang reading p2 until we're killed
14+
! invoke_bfs p1 -exec sh -c 'echo $$ >p1 && read -r _ <p2' {} + || fail
15+
16+
wait

0 commit comments

Comments
 (0)