]> sourceware.org Git - systemtap.git/commitdiff
Test harness improvements for testing using a compile server.
authorDave Brolley <brolley@redhat.com>
Wed, 9 Feb 2011 20:57:33 +0000 (15:57 -0500)
committerDave Brolley <brolley@redhat.com>
Wed, 9 Feb 2011 21:00:09 +0000 (16:00 -0500)
- Always generate and authorize new server cert when a server starts.
- Only consider online servers when testing for trust in client.exp.

testsuite/lib/systemtap.exp
testsuite/systemtap.server/client.exp

index d1611028d0b875529660503020bc8a48ad00f892..1c2ccd373ff75325a8dcfc740a845057bdb87e49 100644 (file)
@@ -133,12 +133,14 @@ proc setup_server {} {
 
     # Make sure that stap can find the server.
     set use_server --use-server
-    set res [catch { exec stap --list-servers=online,trusted,compatible >& $net_path/stap-list-servers.out } looksee]
-    verbose -log "stap --list-servers returned: res==$res\n$looksee"
-    set res [catch { exec grep "^ host" $net_path/stap-list-servers.out } looksee]
+    set res [catch { exec stap --list-servers=online,trusted,compatible >& stap-list-servers.out } looksee]
+    verbose -log "stap --list-servers returned: res==$res"
+    verbose -log $looksee[exec cat stap-list-servers.out]
+    set res [catch { exec grep "^ host" stap-list-servers.out } looksee]
     verbose -log "grep for servers returned: res==$res\n$looksee"
+
     if {$res != 0} then {
-       verbose -log "Unable to automatically find a systemtap server -- check firewall settings for mDNS"
+       verbose -log "Unable to automatically find the systemtap server -- check firewall settings for mDNS"
        # Try to discover the port the server is listening on from the server
        # log.
        set res [catch { exec /bin/cat [exec pwd]/server.log | awk "/^Systemtap Compile Server on port .* ready/ {print \$6}" } server_port]
@@ -199,6 +201,9 @@ proc start_server {} {
     exec touch $logfile
     exec chmod 666 $logfile
 
+    # Start with fresh server certificates
+    exec rm -fr $env(SYSTEMTAP_DIR)/ssl
+
     # Try to start the server.
     set server_pid [exec env STAP_PR11197_OVERRIDE=1 env SYSTEMTAP_STAP=[exec which stap] stap-start-server --log=$logfile]
     if { "$server_pid" == "" } then {
index 959bee755336e2b86324ac34c7b8a04e0e89221f..f0863acf15bd758aef3d1b18c5643d6e28a4bf38 100644 (file)
@@ -196,7 +196,7 @@ if {$n == 0} {
 
 # Our server should now be trusted, separate from the previously discovered
 # trusted servers.
-list_servers "List current trusted servers" trusted
+list_servers "List current trusted servers" online,trusted
 array unset current_trusted_servers
 array set current_trusted_servers [array get servers]
 
@@ -340,7 +340,7 @@ catch close
 
 # Our server should be trusted again, separate from the previously discovered
 # trusted servers.
-list_servers "List current trusted servers after reinstatement by ip address" trusted
+list_servers "List current trusted servers after reinstatement by ip address" online,trusted
 array unset current_trusted_servers
 array set current_trusted_servers [array get servers]
 
This page took 0.031345 seconds and 5 git commands to generate.