sigreturn.test revision 8f54664d68f5f39098e448815fefe69762b4672a
1#!/bin/sh
2
3# Check rt_sigprocmask and sigreturn/rt_sigreturn decoding.
4
5. "${srcdir=.}/init.sh"
6
7run_prog
8run_strace -esignal $args
9
10mask='\[(USR2 CHLD|CHLD USR2) RT_2 RT_3 RT_4 RT_26 RT_27\]'
11rt_sigprocmask='rt_sigprocmask\(SIG_SETMASK, '"$mask"', NULL, [[:digit:]]+\) += 0'
12osf_sigprocmask='osf_sigprocmask\(SIG_SETMASK, '"$mask"'\) += 0 +\(old mask \[[^]]*\]\)'
13EXPECTED="$LOG.expected"
14
15cat > "$EXPECTED" << __EOF__
16$rt_sigprocmask|$osf_sigprocmask
17(rt_)?sigreturn\\((\\{mask=$mask\\})?\\) += 0
18__EOF__
19
20match_grep "$LOG" "$EXPECTED"
21rm -f "$EXPECTED"
22
23exit 0
24