Debian Codegraph @

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

raw
1 set test "utf_user_trunc"
2
3 if {! [installtest_p]} { untested "$test"; return }
4 if {! [uprobes_p]} { untested "$test"; return }
5
6 set ::result_string {utf-16:012345678901234567890123456789012345678Z
7 utf-16:0123456789012345678901234567890123456789
8 utf-16:01234567890123456789012345678901234567Ω
9 utf-16:012345678901234567890123456789012345678
10 utf-16:0123456789012345678901234567890123456789
11 utf-16:0123456789012345678901234567890123456☺
12 utf-16:01234567890123456789012345678901234567
13 utf-16:012345678901234567890123456789012345678
14 utf-16:0123456789012345678901234567890123456789
15 utf-16:012345678901234567890123456789012345😈
16 utf-16:0123456789012345678901234567890123456
17 utf-16:01234567890123456789012345678901234567
18 utf-16:012345678901234567890123456789012345678
19 utf-16:0123456789012345678901234567890123456789
20 utf-32:012345678901234567890123456789012345678Z
21 utf-32:0123456789012345678901234567890123456789
22 utf-32:01234567890123456789012345678901234567Ω
23 utf-32:012345678901234567890123456789012345678
24 utf-32:0123456789012345678901234567890123456789
25 utf-32:0123456789012345678901234567890123456☺
26 utf-32:01234567890123456789012345678901234567
27 utf-32:012345678901234567890123456789012345678
28 utf-32:0123456789012345678901234567890123456789
29 utf-32:012345678901234567890123456789012345😈
30 utf-32:0123456789012345678901234567890123456
31 utf-32:01234567890123456789012345678901234567
32 utf-32:012345678901234567890123456789012345678
33 utf-32:0123456789012345678901234567890123456789}
34
35 set srcfile "$srcdir/$subdir/$test.c"
36 set stpfile "$srcdir/$subdir/$test.stp"
37 set exefile "[pwd]/$test.exe"
38 set test_flags "additional_flags=-g additional_flags=-DMAXSTRINGLEN=41"
39 set res [target_compile "$srcfile" "$exefile" executable "$test_flags"]
40 if { $res != "" } {
41 verbose "target_compile failed: $res" 2
42 fail "$test compile"
43 untested "$test"
44 return
45 } else {
46 pass "$test compile"
47 }
48
49 foreach runtime [get_runtime_list] {
50 if {$runtime != ""} {
51 # use module name of 10 chars + \0 to fit in MAXSTRINGLEN
52 set module [string range $test 0 9]
53 stap_run3 "$test ($runtime)" "$stpfile" -c "$exefile" \
54 -DMAXSTRINGLEN=41 --runtime=$runtime -m$module
55 } else {
56 stap_run3 $test "$stpfile" -c "$exefile" -DMAXSTRINGLEN=41
57 }
58 }
59 if { $verbose == 0 } { catch { exec rm -f $exefile } }