]> sourceware.org Git - systemtap.git/commitdiff
testsuite listing_mode: Adapt to changed line numbers
authorFrank Ch. Eigler <fche@redhat.com>
Mon, 16 Feb 2015 20:50:55 +0000 (15:50 -0500)
committerFrank Ch. Eigler <fche@redhat.com>
Mon, 16 Feb 2015 20:52:03 +0000 (15:52 -0500)
commit 2538abbc94 inserted some blank lines to separate function
declarations and bodies, but the .exp file needs correponding updates
for the pushed-down line numbers.

testsuite/systemtap.base/listing_mode.c
testsuite/systemtap.base/listing_mode.exp

index 47ecdbcaed8c405d500691fc30c524a02f4afb63..81f5d20b44f9253332b014fc48d9b465dbefb996 100644 (file)
@@ -1,9 +1,8 @@
 #include "sys/sdt.h"
 #include <stdio.h>
 #include <unistd.h>
-
 #ifdef LISTING_MODE_MAIN
-
+/* NB: line numbers in this file are carefully calibrated to .exp test-case contents.  */
 int globalvar = 1;
 
 extern int libfoo(int lf);
index 3e90240d60c0e942b55204432ee3c927c90576e3..4a0d718af5cffae223b1bd81fd84777a6b57c7bf 100644 (file)
@@ -25,9 +25,11 @@ if {[info exists ::env(LISTING_MODE_SUBTEST)]} {
 # of it is treated as a regular expression.  If $nlines_exp is not -1, then
 # exactly $nlines_exp lines are expected.
 proc stap_list {pp {exp ""} {nlines_exp 1} {arguments ""}} {
-   global test TARGET_SUBTEST
+   global test TARGET_SUBTEST exefullpath sofullpath
 
    set subtest "$test ($pp $arguments)"
+   set subtest [regsub -all $exefullpath $subtest EXEFULLPATH]
+   set subtest [regsub -all $sofullpath $subtest SOFULLPATH]
 
    if {$TARGET_SUBTEST != ""} {
       if {![string match $TARGET_SUBTEST $pp]} {
@@ -845,62 +847,62 @@ if {$exepath != ""} {
    testing_probe {process.library(string).function(string)}
 
    stap_list_cmd_lib "process.library(\"sopath\").function(\"libfoo\")" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libfoo@\[^:\]+:54\"\\\)"
+      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libfoo@\[^:\]+:55\"\\\)"
 
    testing_probe {process.library(string).function(string).call}
 
    stap_list_cmd_lib "process.library(\"sopath\").function(\"libfoo\").call" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libfoo@\[^:\]+:54\"\\\)\\\.call"
+      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libfoo@\[^:\]+:55\"\\\)\\\.call"
 
    if {[callee_probes_p]} {
 
       testing_probe {process.library(string).function(string).callee(string)}
 
       stap_list_cmd_lib "process.library(\"sopath\").function(\"libfoo\").callee(\"libbar\")" \
-         "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libfoo@\[^:\]+:54\"\\\)\\\.callee\\\(\"libbar@\[^:\]+:47\"\\\)"
+         "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libfoo@\[^:\]+:55\"\\\)\\\.callee\\\(\"libbar@\[^:\]+:48\"\\\)"
 
       testing_probe {process.library(string).function(string).callees}
 
       stap_list_cmd_lib "process.library(\"sopath\").function(\"libfoo\").callees" \
-         "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libfoo@\[^:\]+:54\"\\\)\\\.callee\\\(\"libbar@\[^:\]+:47\"\\\)"
+         "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libfoo@\[^:\]+:55\"\\\)\\\.callee\\\(\"libbar@\[^:\]+:48\"\\\)"
 
       testing_probe {process.library(string).function(string).callees(number)}
 
       stap_list_cmd_lib "process.library(\"sopath\").function(\"libfoo\").callees(1)" \
-         "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libfoo@\[^:\]+:54\"\\\)\\\.callee\\\(\"libbar@\[^:\]+:47\"\\\)"
+         "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libfoo@\[^:\]+:55\"\\\)\\\.callee\\\(\"libbar@\[^:\]+:48\"\\\)"
 
       stap_list_cmd_lib "process.library(\"sopath\").function(\"libfoo\").callees(2)" \
-         "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"lib(foo|bar)@\[^:\]+:(54|47)\"\\\)\\\.callee\\\(\"(libbar|libinln)@\[^:\]+:(47|42)\"\\\)" {2}
+         "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"lib(foo|bar)@\[^:\]+:(55|48)\"\\\)\\\.callee\\\(\"(libbar|libinln)@\[^:\]+:(48|43)\"\\\)" {2}
    }
 
    testing_probe {process.library(string).function(string).exported}
 
    stap_list_cmd_lib "process.library(\"sopath\").function(\"libfoo\").exported" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libfoo@\[^:\]+:54\"\\\)\\\.exported"
+      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libfoo@\[^:\]+:55\"\\\)\\\.exported"
 
    testing_probe {process.library(string).function(string).inline}
 
    stap_list_cmd_lib "process.library(\"sopath\").function(\"libinln\").inline" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libinln@\[^:\]+:42\"\\\)\\\.inline"
+      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libinln@\[^:\]+:43\"\\\)\\\.inline"
 
    testing_probe {process.library(string).function(string).label(string)}
 
    stap_list_cmd_lib "process.library(\"sopath\").function(\"libfoo\").label(\"lib_label\")" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libfoo@\[^:\]+:57\"\\\)\\\.label\\\(\"lib_label\"\\\)"
+      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libfoo@\[^:\]+:58\"\\\)\\\.label\\\(\"lib_label\"\\\)"
 
    stap_list_cmd_lib "process.library(\"sopath\").function(\"libfoo\").label(\"lib_labe?\")" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libfoo@\[^:\]+:57\"\\\)\\\.label\\\(\"lib_label\"\\\)"
+      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libfoo@\[^:\]+:58\"\\\)\\\.label\\\(\"lib_label\"\\\)"
 
-   stap_list_cmd_lib "process.library(\"sopath\").function(\"libfoo@$test.c:57\").label(\"lib_label\")" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libfoo@\[^:\]+:57\"\\\)\\\.label\\\(\"lib_label\"\\\)"
+   stap_list_cmd_lib "process.library(\"sopath\").function(\"libfoo@$test.c:58\").label(\"lib_label\")" \
+      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libfoo@\[^:\]+:58\"\\\)\\\.label\\\(\"lib_label\"\\\)"
 
-   stap_list_cmd_lib "process.library(\"sopath\").function(\"libfoo@$test.c:57\").label(\"lib_labe?\")" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libfoo@\[^:\]+:57\"\\\)\\\.label\\\(\"lib_label\"\\\)"
+   stap_list_cmd_lib "process.library(\"sopath\").function(\"libfoo@$test.c:58\").label(\"lib_labe?\")" \
+      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libfoo@\[^:\]+:58\"\\\)\\\.label\\\(\"lib_label\"\\\)"
 
    testing_probe {process.library(string).function(string).return}
 
    stap_list_cmd_lib "process.library(\"sopath\").function(\"libfoo\").return" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libfoo@\[^:\]+:54\"\\\)\\\.return"
+      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.function\\\(\"libfoo@\[^:\]+:55\"\\\)\\\.return"
 
    testing_probe {process.library(string).mark(string)}
 
@@ -963,27 +965,27 @@ if {$exepath != ""} {
    testing_probe {process.library(string).statement(string)}
 
    stap_list_cmd_lib "process.library(\"sopath\").statement(\"libinln\")" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(\"libinln@\[^:\]+:42\"\\\)"
+      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(\"libinln@\[^:\]+:43\"\\\)"
 
    stap_list_cmd_lib "process.library(\"sopath\").statement(\"libfoo\")" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(\"libfoo@\[^:\]+:54\"\\\)"
+      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(\"libfoo@\[^:\]+:55\"\\\)"
 
    stap_list_cmd_lib "process.library(\"sopath\").statement(\"libfoo@$test.c\")" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(\"libfoo@\[^:\]+:54\"\\\)"
+      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(\"libfoo@\[^:\]+:55\"\\\)"
 
-   stap_list_cmd_lib "process.library(\"sopath\").statement(\"libfoo@$test.c:56\")" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(\"libfoo@\[^:\]+:56\"\\\)"
+   stap_list_cmd_lib "process.library(\"sopath\").statement(\"libfoo@$test.c:57\")" \
+      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(\"libfoo@\[^:\]+:57\"\\\)"
 
-   stap_list_cmd_lib "process.library(\"sopath\").statement(\"libfo?@$test.c:56\")" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(\"libfoo@\[^:\]+:56\"\\\)"
+   stap_list_cmd_lib "process.library(\"sopath\").statement(\"libfo?@$test.c:57\")" \
+      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(\"libfoo@\[^:\]+:57\"\\\)"
 
    stap_list_cmd_lib "process.library(\"sopath\").statement(\"libfoo@$test.c+2\")" \
-      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(\"libfoo@\[^:\]+:56\"\\\)"
+      "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(\"libfoo@\[^:\]+:57\"\\\)"
 
-   stap_list_cmd_lib "process.library(\"sopath\").statement(\"libfoo@$test.c:54-56\")" \
+   stap_list_cmd_lib "process.library(\"sopath\").statement(\"libfoo@$test.c:55-56\")" \
       "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(\"libfoo@\[^:\]+:\[0-9\]+\"\\\)" {-1}
 
-   stap_list_cmd_lib "process.library(\"sopath\").statement(\"libfoo@$test.c:54,55-56\")" \
+   stap_list_cmd_lib "process.library(\"sopath\").statement(\"libfoo@$test.c:55,55-56\")" \
       "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(\"libfoo@\[^:\]+:\[0-9\]+\"\\\)" {-1}
 
    stap_list_cmd_lib "process.library(\"sopath\").statement(\"libfoo@$test.c:*\")" \
@@ -991,11 +993,11 @@ if {$exepath != ""} {
 
    testing_probe {process.library(string).statement(string).nearest}
 
-   stap_list_cmd_lib "process.library(\"sopath\").statement(\"libfoo@$test.c:57\").nearest" \
-       "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(\"libfoo@\[^:\]+:57\"\\\).nearest"
+   stap_list_cmd_lib "process.library(\"sopath\").statement(\"libfoo@$test.c:58\").nearest" \
+       "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(\"libfoo@\[^:\]+:58\"\\\).nearest"
 
    stap_list_cmd_lib "process.library(\"sopath\").statement(\"libfoo@$test.c+3\").nearest" \
-       "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(\"libfoo@\[^:\]+:57\"\\\).nearest"
+       "re:process\\\(\"$exefullpath\"\\\)\\\.library\\\(\"$sofullpath\"\\\)\\\.statement\\\(\"libfoo@\[^:\]+:58\"\\\).nearest"
 
    testing_probe {process.mark(string)}
 
This page took 0.039847 seconds and 5 git commands to generate.