Debian Codegraph @

doc/SystemTap_Beginners_Guide/testsuite/systemtap.base/bz5274.exp

raw
1 set test "./bz5274"
2 set tpath "$srcdir/$subdir/$test"
3 set arch [exec uname -i]
4
5 if {! [installtest_p]} {
6 untested "$test -p5"
7 return
8 }
9
10 if {![uretprobes_p]} {
11 untested "$test -p5"
12 return
13 }
14
15 if {$arch == "ppc64"} {
16 catch {exec gcc -o $test -g -m64 $srcdir/$subdir/$test.c} err
17 } else {
18 catch {exec gcc -o $test -g $srcdir/$subdir/$test.c} err
19 }
20
21 if {$err == "" && [file exists $test]} then {
22 pass "$test compile"
23 } else {
24 fail "$test compile"
25 }
26
27 if {[catch {exec stap -w $tpath.stp -c "$srcdir/$subdir/$test.sh"} res]} {
28 untested "$test longjmp to a uretprobed function"
29 verbose -log "$res"
30 catch {exec rm -f $test.out}
31 } else {
32 if {[catch {exec cmp $test.out $srcdir/$subdir/$test.exp_out} res]} {
33 fail "$test longjmp to a uretprobed function"
34 verbose -log "$res"
35 catch {exec rm -f $test.out}
36 } else {
37 pass "$test longjmp to a uretprobed function"
38 catch {exec rm -f $test.out}
39 }
40 }
41
42 if {[catch {exec stap $tpath.a.stp -c $srcdir/$subdir/$test.sh} res]} {
43 untested "$test longjmp to a non-uretprobed function"
44 verbose -log "$res"
45 catch {exec rm -f $test.out $test}
46 } else {
47 if {[catch {exec cmp $test.out $srcdir/$subdir/$test.exp_out} res]} {
48 fail "$test longjmp to a non-uretprobed function"
49 verbose -log "$res"
50 catch {exec rm -f $test.out $test}
51 } else {
52 pass "$test longjmp to a non-uretprobed function"
53 catch {exec rm -f $test.out $test}
54 }
55 }
56
57