From 23d89280bdf6bf4c341478eb766dba9d4f395708 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Sun, 29 Mar 2009 15:57:11 -0400 Subject: tweak "Distro:" line generation in testsuite logs, to moot "oracle-enterprise.patch" --- testsuite/lib/systemtap.exp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'testsuite/lib/systemtap.exp') diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp index c80ad171..b9db4e40 100644 --- a/testsuite/lib/systemtap.exp +++ b/testsuite/lib/systemtap.exp @@ -151,10 +151,9 @@ proc get_system_info {} { set Snapshot $version } set Distro "Linux" - if [file exists /etc/fedora-release] {set Distro [exec /bin/cat /etc/fedora-release]} - if [file exists /etc/redhat-release] {set Distro [exec /bin/cat /etc/redhat-release]} - if [file exists /etc/suse-release] {set Distro [exec /bin/cat /etc/suse-release]} - if [file exists /etc/debian_version] {set Distro [exec /bin/cat /etc/debian_version]} + foreach f {/etc/fedora-release /etc/enterprise-release /etc/redhat-release /etc/suse-release /etc/debian_version} { + if [file exists $f] then {set Distro [exec /bin/cat $f]; break } + } } if {! [setup_systemtap_environment]} then { -- cgit From 172d72b30e804bda124f26b858f0f3081a561b3c Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Sun, 29 Mar 2009 16:40:13 -0400 Subject: prefer using /usr/bin/lsb_release to deduce distribution for testsuite --- testsuite/lib/systemtap.exp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'testsuite/lib/systemtap.exp') diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp index b9db4e40..554e88ed 100644 --- a/testsuite/lib/systemtap.exp +++ b/testsuite/lib/systemtap.exp @@ -148,11 +148,17 @@ proc get_system_info {} { set Snapshot [exec /bin/cat $env(SRCDIR)/../SNAPSHOT] } else { regexp {version [^)]*} [exec stap -V 2>@ stdout] version - set Snapshot $version + set Snapshot $version } set Distro "Linux" - foreach f {/etc/fedora-release /etc/enterprise-release /etc/redhat-release /etc/suse-release /etc/debian_version} { - if [file exists $f] then {set Distro [exec /bin/cat $f]; break } + if [file exists /usr/bin/lsb_release] { + # this produces one line of this format: + # Distribution:\tSTRING + set Distro [lrange [exec /usr/bin/lsb_release -d] 1 end] + } else { + foreach f {/etc/fedora-release /etc/enterprise-release /etc/redhat-release /etc/suse-release /etc/debian_version} { + if [file exists $f] then {set Distro [exec /bin/cat $f]; break } + } } } -- cgit From 83ff01c2f669c66100a5cf7531dda9410a8ff6ce Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Wed, 1 Apr 2009 20:33:51 -0400 Subject: introduce [utrace_p] as dejagnu check for utrace presence in kernel * testsuite/lib/systemtap.exp: Define here. * testsuite/systemtap.*/*.exp: Use it here. Eliminate duplicated utrace_support_present logic. --- testsuite/lib/systemtap.exp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'testsuite/lib/systemtap.exp') diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp index 554e88ed..5311be7b 100644 --- a/testsuite/lib/systemtap.exp +++ b/testsuite/lib/systemtap.exp @@ -16,6 +16,16 @@ proc use_server_p {} { } +proc utrace_p {} { + set path "/proc/kallsyms" + if {! [catch {exec grep -q utrace_attach $path} dummy]} { + return 1 + } else { + return 0 + } +} + + proc print_systemtap_version {} { set version [exec /bin/uname -r] set location "/boot/vmlinux-$version" -- cgit From 0af51b594e033a9d7148be6428f7365f2fcd1663 Mon Sep 17 00:00:00 2001 From: David Smith Date: Wed, 8 Apr 2009 15:31:49 -0500 Subject: Better error handling in 'setup_server'. 2009-04-08 David Smith * lib/systemtap.exp (setup_server): Better error handling. --- testsuite/lib/systemtap.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'testsuite/lib/systemtap.exp') diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp index 5311be7b..98108fa5 100644 --- a/testsuite/lib/systemtap.exp +++ b/testsuite/lib/systemtap.exp @@ -85,7 +85,7 @@ proc setup_server {} { # Make sure that the necessary resources are available to run the client/server. if {[installtest_p]} then { - if {[exec /usr/bin/which stap-client-connect] == ""} then { + if {[catch {exec /usr/bin/which stap-client-connect} dummy]} then { print "Unable to start a server: stap-client-connect is not found in PATH" return 0 } @@ -93,7 +93,7 @@ proc setup_server {} { print "Unable to start a server: [exec pwd]/../stap-client-connect is not found" return 0 } - if {[exec /usr/bin/which avahi-publish-service] == ""} then { + if {[catch {exec /usr/bin/which avahi-publish-service} dummy]} then { print "Unable to start a server: avahi-publish-service is not found in PATH" return 0 } -- cgit From 2035bcd40b17832439df0a1eb28403b99a71b74f Mon Sep 17 00:00:00 2001 From: Dave Brolley Date: Mon, 4 May 2009 16:05:22 -0400 Subject: Module signing and verification using a separate file for the module signature. --- testsuite/lib/systemtap.exp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'testsuite/lib/systemtap.exp') diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp index 98108fa5..019b1bf8 100644 --- a/testsuite/lib/systemtap.exp +++ b/testsuite/lib/systemtap.exp @@ -128,8 +128,10 @@ proc setup_server {} { # The server does not call this instance of 'stap' if {[installtest_p]} then { exec /bin/cp -p [exec which stap-client] $net_path/stap + exec /bin/cp -p [exec which stap-env] $net_path/stap-env } else { exec /bin/cp -p $srcdir/../stap-client $net_path/stap + exec /bin/cp -p $srcdir/../stap-env $net_path/stap-env } set env(PATH) "$net_path:$env(PATH)" -- cgit From 67c7a9ac91ea3de5cadb7c90028365fdac1f530f Mon Sep 17 00:00:00 2001 From: Dave Brolley Date: Wed, 6 May 2009 13:52:52 -0400 Subject: Problems using server scripts when not on PATH. HAVE_NSS related compile time warning. --- testsuite/lib/systemtap.exp | 1 + 1 file changed, 1 insertion(+) (limited to 'testsuite/lib/systemtap.exp') diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp index 019b1bf8..379f6c58 100644 --- a/testsuite/lib/systemtap.exp +++ b/testsuite/lib/systemtap.exp @@ -109,6 +109,7 @@ proc setup_server {} { if {! [installtest_p]} then { # Make sure the server management scripts and tools are on the $PATH. set env(PATH) "$srcdir/..:[exec pwd]/..:$env(PATH)" + set env(SYSTEMTAP_SERVER_SCRIPTS) "$srcdir/.." } # Try to find or start the server. -- cgit