# $OpenBSD: Makefile,v 1.2 2020/12/17 00:51:12 bluhm Exp $ PROG = sigpthread WARNINGS = yes LDADD = -lpthread DPADD = ${LIBPTHREAD} CLEANFILES += out # first test signal delivery while they are blocked .for t in 0 1 2 REGRESS_TARGETS += run-block-thread-3-unblock-$t run-block-thread-3-unblock-$t: # block signal # run 3 threads # kill process # suspend threads until signaled # unblock thread $t # handle signal ./sigpthread -b -t 3 -u $t >out grep 'signal $t' out test `wc -l out grep 'signal $t' out test `wc -l out grep 'signal $t' out test `wc -l out grep 'signal $t' out test `wc -l out grep 'signal $t' out test `wc -l out grep 'signal $t' out test `wc -l out grep 'signal $t' out test `wc -l out grep 'signal $t' out test `wc -l out grep 'signal $t' out test `wc -l out grep 'signal $t' out test `wc -l out grep 'signal $t' out test `wc -l out grep 'signal $t' out test `wc -l out grep 'signal [0-2]' out test `wc -l out grep 'signal [0-2]' out test `wc -l out grep 'signal [0-2]' out test `wc -l out grep 'signal [0-2]' out test `wc -l out grep 'signal $t' out test `wc -l out grep 'signal $t' out test `wc -l out grep 'signal $t' out test `wc -l out grep 'signal $t' out test `wc -l out grep 'signal [0-2]' out test `wc -l out grep 'signal [0-2]' out test `wc -l out grep 'signal [0-2]' out test `wc -l out grep 'signal [0-2]' out test `wc -l out grep 'signal $t' out test `wc -l out grep 'signal $t' out test `wc -l out grep 'signal $t' out test `wc -l out grep 'signal $t' out test `wc -l out grep 'signal $t' out test `wc -l out grep 'signal $t' out test `wc -l out grep 'signal 23' out test `wc -l out grep 'signal 42' out test `wc -l