summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-07-10 11:09:36 -0400
committerDave Brolley <brolley@redhat.com>2009-07-10 11:09:36 -0400
commit7d54db1a2c0b3831b6fbc8282f1155426c4be540 (patch)
tree8b36db60debe82f138f1cfe8c7fab4b6196052bc
parentfd6fef3d049555f7af24ba94fbcf42a846390dd1 (diff)
downloadsystemtap-steved-7d54db1a2c0b3831b6fbc8282f1155426c4be540.tar.gz
systemtap-steved-7d54db1a2c0b3831b6fbc8282f1155426c4be540.tar.xz
systemtap-steved-7d54db1a2c0b3831b6fbc8282f1155426c4be540.zip
Rename systemtap_exit to cleanup.
Allow shutdown_server to test $server_pid in order to determine whether we started a server.
-rw-r--r--testsuite/lib/systemtap.exp11
1 files changed, 6 insertions, 5 deletions
diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp
index e04fe837..76fd57bd 100644
--- a/testsuite/lib/systemtap.exp
+++ b/testsuite/lib/systemtap.exp
@@ -53,7 +53,7 @@ proc print_systemtap_version {} {
proc setup_systemtap_environment {} {
- global srcdir env
+ global srcdir env server_pid net_path
# need an absolute SRCDIR for the top-level src/ tree
# XXX: or, we could change nearby uses of ${SRCDIR}/testsuite to ${SRCDIR}
@@ -68,6 +68,8 @@ proc setup_systemtap_environment {} {
set env(SYSTEMTAP_DIR) [exec pwd]/.systemtap-[exec whoami]
# Find or start a systemtap server, if requested.
+ set net_path ""
+ set server_pid 0
if {[use_server_p]} then {
if {! [setup_server]} then {
return 0
@@ -151,6 +153,7 @@ proc shutdown_server {} {
if { $server_pid != 0 } then {
print "Stopping the systemtap server with PID==$server_pid"
exec stap-stop-server $server_pid
+ set server_pid 0
}
# Remove the temporary stap script
@@ -198,11 +201,9 @@ get_system_info
proc systemtap_init {args} {}
proc systemtap_version {} {}
-proc systemtap_exit {} {
+proc cleanup {} {
# Stop the stap server, if we started it.
- if {[use_server_p]} then {
- shutdown_server
- }
+ shutdown_server
}