]> sourceware.org Git - systemtap.git/commitdiff
listing_mode.exp: don't test plt probes if unsupported
authorJonathan Lebon <jlebon@redhat.com>
Wed, 11 Jun 2014 14:32:44 +0000 (10:32 -0400)
committerJonathan Lebon <jlebon@redhat.com>
Wed, 11 Jun 2014 15:17:58 +0000 (11:17 -0400)
On some architectures, plt probes are not supported. Check for those and
skip testing them if so.

testsuite/systemtap.base/listing_mode.exp

index e594dcb4057dbe79a5a93331e680a7c0fa1a2ffb..cca15f2cc5c2cce3f87dcd2f636d8f569582d4ae 100644 (file)
@@ -29,6 +29,16 @@ if {[strverscmp $GCC_Version 4.7] < 0 || \
    set callee_supported 1
 }
 
+# Check if .plt probes are supported
+switch -regexp $::tcl_platform(machine) {
+   {^(ppc|ppc64|s390|s390x)$} {
+      set plt_supported 0
+   }
+   default {
+      set plt_supported 1
+   }
+}
+
 # Runs stap -l $pp and checks that every line output matches $exp. If $exp is
 # missing, checks that lines match $pp. If $exp starts with 're:' then the rest
 # of it is treated as a regular expression.  If $nlines_exp is not -1, then
@@ -241,7 +251,7 @@ proc testing_probe {probe_type} {
 
 # Reports all probe types in the list that haven't been tested
 proc report_untested_probes {} {
-   global test all_probe_types callee_supported
+   global test all_probe_types callee_supported plt_supported
 
    foreach probe_type $all_probe_types {
       switch $probe_type {
@@ -342,6 +352,28 @@ proc report_untested_probes {} {
             }
          }
 
+         process.library(string).plt -
+         process.library(string).plt.statement(number) -
+         process.library(string).plt(string) -
+         process.library(string).plt(string).statement(number) -
+         process(string).library(string).plt -
+         process(string).library(string).plt.statement(number) -
+         process(string).library(string).plt(string) -
+         process(string).library(string).plt(string).statement(number) -
+         process.plt -
+         process.plt.statement(number) -
+         process.plt(string) -
+         process.plt(string).statement(number) -
+         process(string).plt -
+         process(string).plt.statement(number) -
+         process(string).plt(string) -
+         process(string).plt(string).statement(number)
+         {
+            if {!$plt_supported} {
+               setup_kfail PLT *-*-*
+            }
+         }
+
          process(string).insn -
          process(number).insn -
          process(string).insn.block -
@@ -807,37 +839,40 @@ if {$exepath != ""} {
    stap_list_cmd_lib "process.library(\"sopath\").mark(\"mark\")" \
       "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.mark\\\(\"mark\"\\\)"
 
-   testing_probe {process.library(string).plt}
+   if {$plt_supported} {
+
+      testing_probe {process.library(string).plt}
 
-   stap_list_cmd_lib "process.library(\"sopath\").plt" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.plt\\\(\"\[^\"\]+\"\\\)" {-1}
+      stap_list_cmd_lib "process.library(\"sopath\").plt" \
+         "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.plt\\\(\"\[^\"\]+\"\\\)" {-1}
 
-   testing_probe {process.library(string).plt.statement(number)}
+      testing_probe {process.library(string).plt.statement(number)}
 
-   stap_list_cmd_lib "process.library(\"sopath\").plt.statement(0x123)" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(0x\[a-f0-9\]+\\\)"
+      stap_list_cmd_lib "process.library(\"sopath\").plt.statement(0x123)" \
+         "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(0x\[a-f0-9\]+\\\)"
 
-   testing_probe {process.library(string).plt(string)}
+      testing_probe {process.library(string).plt(string)}
 
-   stap_list_cmd_lib "process.library(\"sopath\").plt(\"libbar\")" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.plt\\\(\"libbar\"\\\)"
+      stap_list_cmd_lib "process.library(\"sopath\").plt(\"libbar\")" \
+         "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.plt\\\(\"libbar\"\\\)"
 
-   stap_list_cmd_lib "process.library(\"sopath\").plt(\"libba?\")" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.plt\\\(\"libbar\"\\\)"
+      stap_list_cmd_lib "process.library(\"sopath\").plt(\"libba?\")" \
+         "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.plt\\\(\"libbar\"\\\)"
 
-   stap_list_cmd_lib "process.library(\"sopath\").plt(\"\\\[lp\\\]*\")" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.plt\\\(\"(libbar|printf)\"\\\)" {-1}
+      stap_list_cmd_lib "process.library(\"sopath\").plt(\"\\\[lp\\\]*\")" \
+         "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.plt\\\(\"(libbar|printf)\"\\\)" {-1}
 
-   testing_probe {process.library(string).plt(string).statement(number)}
+      testing_probe {process.library(string).plt(string).statement(number)}
 
-   stap_list_cmd_lib "process.library(\"sopath\").plt(\"libbar\").statement(0x123)" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(0x\[a-f0-9\]+\\\)"
+      stap_list_cmd_lib "process.library(\"sopath\").plt(\"libbar\").statement(0x123)" \
+         "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(0x\[a-f0-9\]+\\\)"
 
-   stap_list_cmd_lib "process.library(\"sopath\").plt(\"libba?\").statement(0x123)" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(0x\[a-f0-9\]+\\\)"
+      stap_list_cmd_lib "process.library(\"sopath\").plt(\"libba?\").statement(0x123)" \
+         "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(0x\[a-f0-9\]+\\\)"
 
-   stap_list_cmd_lib "process.library(\"sopath\").plt(\"\\\[lp\\\]*\").statement(0x123)" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(0x\[a-f0-9\]+\\\)"
+      stap_list_cmd_lib "process.library(\"sopath\").plt(\"\\\[lp\\\]*\").statement(0x123)" \
+         "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(0x\[a-f0-9\]+\\\)"
+   }
 
    testing_probe {process.library(string).provider(string).mark(string)}
 
@@ -886,37 +921,40 @@ if {$exepath != ""} {
    stap_list_cmd "process.mark(\"mark\")" \
       "re:process\\\(\"$exefullpath\"\\\)\\\.mark\\\(\"mark\"\\\)"
 
-   testing_probe {process.plt}
+   if {$plt_supported} {
+
+      testing_probe {process.plt}
 
-   stap_list_cmd "process.plt" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.plt\\\(\"\[^\"\]+\"\\\)" {-1}
+      stap_list_cmd "process.plt" \
+         "re:process\\\(\"$exefullpath\"\\\)\\\.plt\\\(\"\[^\"\]+\"\\\)" {-1}
 
-   testing_probe {process.plt.statement(number)}
+      testing_probe {process.plt.statement(number)}
 
-   stap_list_cmd "process.plt.statement(0x123)" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.statement\\\(0x\[a-f0-9\]+\\\)"
+      stap_list_cmd "process.plt.statement(0x123)" \
+         "re:process\\\(\"$exefullpath\"\\\)\\\.statement\\\(0x\[a-f0-9\]+\\\)"
 
-   testing_probe {process.plt(string)}
+      testing_probe {process.plt(string)}
 
-   stap_list_cmd "process.plt(\"libfoo\")" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.plt\\\(\"libfoo\"\\\)"
+      stap_list_cmd "process.plt(\"libfoo\")" \
+         "re:process\\\(\"$exefullpath\"\\\)\\\.plt\\\(\"libfoo\"\\\)"
 
-   stap_list_cmd "process.plt(\"libfo?\")" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.plt\\\(\"libfoo\"\\\)"
+      stap_list_cmd "process.plt(\"libfo?\")" \
+         "re:process\\\(\"$exefullpath\"\\\)\\\.plt\\\(\"libfoo\"\\\)"
 
-   stap_list_cmd "process.plt(\"\\\[lp\\\]*\")" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.plt\\\(\"(libfoo|printf)\"\\\)" {-1}
+      stap_list_cmd "process.plt(\"\\\[lp\\\]*\")" \
+         "re:process\\\(\"$exefullpath\"\\\)\\\.plt\\\(\"(libfoo|printf)\"\\\)" {-1}
 
-   testing_probe {process.plt(string).statement(number)}
+      testing_probe {process.plt(string).statement(number)}
 
-   stap_list_cmd "process.plt(\"libfoo\").statement(0x123)" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.statement\\\(0x\[a-f0-9\]+\\\)"
+      stap_list_cmd "process.plt(\"libfoo\").statement(0x123)" \
+         "re:process\\\(\"$exefullpath\"\\\)\\\.statement\\\(0x\[a-f0-9\]+\\\)"
 
-   stap_list_cmd "process.plt(\"libfo?\").statement(0x123)" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.statement\\\(0x\[a-f0-9\]+\\\)"
+      stap_list_cmd "process.plt(\"libfo?\").statement(0x123)" \
+         "re:process\\\(\"$exefullpath\"\\\)\\\.statement\\\(0x\[a-f0-9\]+\\\)"
 
-   stap_list_cmd "process.plt(\"\\\[lp\\\]*\").statement(0x123)" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.statement\\\(0x\[a-f0-9\]+\\\)"
+      stap_list_cmd "process.plt(\"\\\[lp\\\]*\").statement(0x123)" \
+         "re:process\\\(\"$exefullpath\"\\\)\\\.statement\\\(0x\[a-f0-9\]+\\\)"
+   }
 
    testing_probe {process.provider(string).mark(string)}
 
This page took 0.038038 seconds and 5 git commands to generate.