]> sourceware.org Git - systemtap.git/commitdiff
Add a new tracepoint test to check compile requirements for each group.
authorDavid Smith <dsmith@redhat.com>
Wed, 5 Apr 2017 16:05:04 +0000 (11:05 -0500)
committerDavid Smith <dsmith@redhat.com>
Wed, 5 Apr 2017 16:05:04 +0000 (11:05 -0500)
* testsuite/systemtap.base/tracepoints_list.exp: Add a new test where we
  make sure that each tracepoint group's compile tweaks are sufficient in
  itself.

testsuite/systemtap.base/tracepoints_list.exp

index e7e1a951ed8ab2b54cc1e5918cf969ff41317821..470391cf9567fdc166f63a80d57382c78f7d5aa6 100644 (file)
@@ -98,4 +98,23 @@ if {$tp_found > 0} {
 } else {
     fail "$test: no common tracepoints found by perf and systemtap"
 }
-    
+
+#
+# Now test the first tracepoint in each group, to make sure compile
+# requirements for each group is sufficient in itself.
+#
+# First, we'll populate the cache directory with the result of
+# building the entire tracepoint query module.
+catch { exec stap -l {kernel.trace("*")} }
+
+# Now test each group individually.
+set last_group ""
+set script_template {"probe kernel.trace(\"%s\") { exit() }"}
+foreach stp $stap_tracepoints {
+    regexp {^([^:]+):([^:]+)$} $stp dummy group tracepoint
+    if {$last_group == $group} { continue }
+    set last_group $group
+
+    set script [format $script_template "${group}:${tracepoint}"]
+    stap_compile "$test: group '$group' solo" 1 $script
+}
This page took 0.02702 seconds and 5 git commands to generate.