Debian Codegraph @

testsuite/semko/target_lvalue.stp

raw
1 #!/bin/sh
2
3 # Make sure that each of these fail with status 1
4 # - status 0 means that they succeeded, which they shouldn't
5 # - a high status code means it crashed (PR11266)
6 #
7 # Since this is a semko, we exit 1 if they all fail correctly,
8 # else we exit 0 for success or crash.
9
10 stap $@ -e 'probe syscall.read { ++$fd }' -p2 -g
11 [ $? -eq 1 ] || exit 0
12
13 stap $@ -e 'probe syscall.read { $fd++ }' -p2 -g
14 [ $? -eq 1 ] || exit 0
15
16 stap $@ -e 'probe syscall.read { delete $fd }' -p2 -g
17 [ $? -eq 1 ] || exit 0
18
19 stap $@ -e 'probe syscall.read { ++$fd = 42 }' -p2 -g
20 [ $? -eq 1 ] || exit 0
21
22 exit 1