OLD | NEW |
1 # Copyright (C) 2012 Free Software Foundation, Inc. | 1 # Copyright (C) 2012-2013 Free Software Foundation, Inc. |
2 | 2 |
3 # This program is free software; you can redistribute it and/or modify | 3 # This program is free software; you can redistribute it and/or modify |
4 # it under the terms of the GNU General Public License as published by | 4 # it under the terms of the GNU General Public License as published by |
5 # the Free Software Foundation; either version 3 of the License, or | 5 # the Free Software Foundation; either version 3 of the License, or |
6 # (at your option) any later version. | 6 # (at your option) any later version. |
7 # | 7 # |
8 # This program is distributed in the hope that it will be useful, | 8 # This program is distributed in the hope that it will be useful, |
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 # GNU General Public License for more details. | 11 # GNU General Public License for more details. |
12 # | 12 # |
13 # You should have received a copy of the GNU General Public License | 13 # You should have received a copy of the GNU General Public License |
14 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 |
16 set testfile stap-probe | 16 standard_testfile |
17 | 17 |
18 # Run the tests. We run the tests two different ways: once with a | 18 # Run the tests. We run the tests two different ways: once with a |
19 # plain probe, and once with a probe that has an associated semaphore. | 19 # plain probe, and once with a probe that has an associated semaphore. |
20 # This returns -1 on failure to compile or start, 0 otherwise. | 20 # This returns -1 on failure to compile or start, 0 otherwise. |
21 proc stap_test {exec_name {arg ""}} { | 21 proc stap_test {exec_name {arg ""}} { |
22 global testfile hex | 22 global testfile hex srcfile |
23 | 23 |
24 if {[prepare_for_testing ${testfile}.exp ${exec_name} ${testfile}.c \ | 24 if {[prepare_for_testing ${testfile}.exp ${exec_name} $srcfile \ |
25 [concat $arg debug]]} { | 25 [concat $arg debug]]} { |
26 return -1 | 26 return -1 |
27 } | 27 } |
28 | 28 |
29 if ![runto_main] { | 29 if ![runto_main] { |
30 return -1 | 30 return -1 |
31 } | 31 } |
32 | 32 |
33 gdb_test "print \$_probe_argc" "No SystemTap probe at PC $hex" \ | 33 gdb_test "print \$_probe_argc" "No SystemTap probe at PC $hex" \ |
34 "check argument not at probe point" | 34 "check argument not at probe point" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 stap_test "stap-probe-sem-noopt" "-DUSE_PROBES" | 170 stap_test "stap-probe-sem-noopt" "-DUSE_PROBES" |
171 } | 171 } |
172 | 172 |
173 with_test_prefix "without semaphore, optimized" { | 173 with_test_prefix "without semaphore, optimized" { |
174 stap_test_no_debuginfo "stap-probe-nosem-opt" | 174 stap_test_no_debuginfo "stap-probe-nosem-opt" |
175 } | 175 } |
176 | 176 |
177 with_test_prefix "with semaphore, optimized" { | 177 with_test_prefix "with semaphore, optimized" { |
178 stap_test_no_debuginfo "stap-probe-sem-opt" "-DUSE_PROBES" | 178 stap_test_no_debuginfo "stap-probe-sem-opt" "-DUSE_PROBES" |
179 } | 179 } |
OLD | NEW |