Debian Codegraph @

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

raw
1 # Make sure however we entered a syscall, we know the calling module name.
2 # the task finder vma tracker should have recorded it.
3
4 set test "vma_vdso"
5
6 # Expect the following three syscalls
7 set ::result_string {clock_gettime
8 getuid
9 getuid}
10
11 for {set i 0} {$i < [arch_compile_flags]} {incr i} {
12 set arch_flag [arch_compile_flag $i]
13 set arch_name [arch_compile_flag_name $i]
14 verbose "testing $test -${arch_name}"
15 set test_arch "${test}-${arch_name}"
16
17 set test_flags "additional_flags=-g"
18 set test_flags "$test_flags additional_flags=-lrt"
19
20 if {$arch_flag != ""} {
21 set test_flags "$test_flags $arch_flag"
22 }
23
24 set res [target_compile $srcdir/$subdir/$test.c ${test_arch}.exe executable "$test_flags"]
25 if { $res != "" } {
26 verbose "target_compile ${test_arch} failed: $res" 2
27 fail "${test}.c compile -${arch_name}"
28 untested "${test_arch}"
29 return
30 } else {
31 pass "${test}.c compile -${arch_name}"
32 }
33
34 # Test only when we are running an install test (can execute)
35 if {[installtest_p]} {
36 stap_run3 ${test_arch} $srcdir/$subdir/$test.stp -c ./${test_arch}.exe
37 } else {
38 untested "${test_arch}"
39 }
40 }