]> sourceware.org Git - systemtap.git/commitdiff
Added test case and documentation to NEWS
authorHousam Alamour <halamour@redhat.com>
Mon, 23 Oct 2023 00:09:59 +0000 (20:09 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Wed, 25 Oct 2023 19:30:06 +0000 (15:30 -0400)
NEWS
testsuite/systemtap.base/debuginfod_probe.exp [changed mode: 0644->0755]

diff --git a/NEWS b/NEWS
index 71e29b5cd857c7fc09694649d8126a52e93604e3..bc2880eb759a4af96cdfa17c5862ebfeea98c74f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,16 @@
 
 - Tapset function print_ubacktrace_fileline() now understands DWARF5 (PR30407)
 
+- Debuginfod probes may now be filtered by archive name.
+  This allows for probing only certain versions of a program 
+  though a glob on the basename of the archive/package name. 
+  For example if one of the files on the deubinfod server is 
+  curl-minimal-8.0.1-5.fc38, the probe can be filtered to only 
+  include the fedora 38 distro of the program (as in example below).
+
+  # export DEBUGINFOD_URLS="URL1 URL2 ..."
+  # stap -e 'probe debuginfod.archive("*.fc38").process("/usr/*/curl").begin { log("Hello World") }'
+
 - The kernel-user message transport system added framing codes, making
   the transport more reliable, but becoming incompatible across
   pre-5.0 versions.  Use matching versions of stap and staprun.
old mode 100644 (file)
new mode 100755 (executable)
index 4825887..669b066
@@ -98,6 +98,28 @@ if {"$debuginfod" == "" || $found_metadata_symbol != 0 || $found_jsonc != 0} the
     catch {close}; catch {wait}
     if {$pass == 1} then { pass $subtest } else { fail $subtest }
 
+    # Test 1d: package
+    set subtest "$test package"
+    set systemtap_script {
+        probe
+        debuginfod
+        .archive("*probe*")
+        .process("/usr/local/bin/hello")
+        .function("main")
+        { printf("HelloWorld\n") }
+    }
+    spawn sh -c "$stap_path -ve \'$systemtap_script\' -p2 2>&1"
+    wait_n_secs 5
+    set pass 0
+    expect {
+        -timeout 5
+        -re {.*process\(\"f0aa15b8aba4f3c28cac3c2a73801fefa644a9f2\"\).function\(\"main\"\)*} { incr pass }
+        eof { }
+        timeout { fail "$subtest (timeout)" }
+    }
+    catch {close}; catch {wait}
+    if {$pass == 1} then { pass $subtest } else { fail $subtest }
+
     # Cleanup
     catch { exec rm -rf "/tmp/staptest" }
     kill -INT $debuginfod_pid
This page took 0.031758 seconds and 5 git commands to generate.