From 528296dc123a95141261b8f6bb4f4ccafb817a94 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Tue, 29 Jan 2013 09:47:29 -0500 Subject: [PATCH] add selinux info to testsuite & stap-report output --- stap-report | 2 ++ testsuite/lib/stap_run.exp | 6 ++++-- testsuite/lib/systemtap.exp | 8 +++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/stap-report b/stap-report index ccc6f3bb1..6e5d75d67 100755 --- a/stap-report +++ b/stap-report @@ -40,3 +40,5 @@ for file in /sys/module/*/notes/.*build* do run "hexdump -C $file" done +run "seinfo && getenforce" + diff --git a/testsuite/lib/stap_run.exp b/testsuite/lib/stap_run.exp index 293a837ee..7dec644b5 100644 --- a/testsuite/lib/stap_run.exp +++ b/testsuite/lib/stap_run.exp @@ -120,14 +120,16 @@ proc wait_5_secs {} { } proc print_system_info {} { - global Host Snapshot Distro GCC_Version + global Host Snapshot Distro GCC_Version SElinux clone_output "\nHost: $Host" if {[string compare $Snapshot "unknown"]!=0} { clone_output "Snapshot: $Snapshot" } clone_output "GCC: $GCC_Version" - clone_output "Distro: $Distro\n" + clone_output "Distro: $Distro" + clone_output "SElinux: $SElinux" + clone_output "\n" } print_system_info diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp index 04ded0b4d..874050c3a 100644 --- a/testsuite/lib/systemtap.exp +++ b/testsuite/lib/systemtap.exp @@ -283,7 +283,7 @@ proc fullpath { path } { } proc get_system_info {} { - global Host Snapshot Distro GCC_Version env + global Host Snapshot Distro GCC_Version env SElinux set Host [exec /bin/uname -a] if [file exists ../SNAPSHOT] { @@ -311,6 +311,12 @@ proc get_system_info {} { # Plus full version between square brackets. set full [exec gcc --version | head -1] set GCC_Version "$n \[$full\]" + # selinux status + if [file exists /usr/sbin/getenforce] { + set SElinux [exec /usr/sbin/getenforce] + } else { + set SElinux "unknown" + } } if {! [setup_systemtap_environment]} then { -- 2.43.5