Dmitry V. Levin | 4b9c68b | 2014-12-05 00:21:23 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # Check capget/capset syscalls decoding. |
| 4 | |
| 5 | . "${srcdir=.}/init.sh" |
| 6 | |
| 7 | check_prog awk |
| 8 | |
| 9 | ./caps || { |
| 10 | if [ $? -eq 77 ]; then |
| 11 | framework_skip_ 'capget/capset syscalls do not behave as expected' |
| 12 | else |
| 13 | fail_ 'caps failed' |
| 14 | fi |
| 15 | } |
| 16 | |
| 17 | args="-e trace=capget,capset ./caps" |
| 18 | $STRACE -o "$LOG" $args || { |
| 19 | cat "$LOG" |
| 20 | fail_ "$STRACE $args failed" |
| 21 | } |
| 22 | |
| 23 | awk -f "$srcdir"/caps.awk "$LOG" || |
| 24 | { cat "$LOG"; fail_ 'unexpected output'; } |
| 25 | |
| 26 | exit 0 |