]> sourceware.org Git - systemtap.git/commitdiff
dw_entry_value.exp: fix the testcase
authorMartin Cermak <mcermak@redhat.com>
Wed, 18 Jan 2023 13:24:12 +0000 (14:24 +0100)
committerMartin Cermak <mcermak@redhat.com>
Wed, 18 Jan 2023 13:24:12 +0000 (14:24 +0100)
After fixing 05eb6742c1 (Handle DWARF5 DW_OP_implicit_pointer and
DW_OP_entry_value), dw_entry_value.exp no more ends up untested,
but instead often fails in Pass 5.

The problem was that stap_run() sends kill -INT to stap right after
the load generation function (no_load() in this case) is executed,
causing a Pass 5 failure and => testcase failure (unexpected output).

A workaround would be to sleep a second before the signal is sent so
that stap can cleanly finish, and the signal can't be delivered, making
the testcase green. But that'd be just a workaround.

This update relies on stap_run2() instead of stap_run(), simplifying
the testcase and making it stable.

testsuite/systemtap.base/dw_entry_value.exp

index b728fa7ff0f6813affff57dd61083baeda22f6e2..6f109e202b11d162230af0001768460a36cbf9d8 100644 (file)
@@ -10,8 +10,12 @@ if { $res != "" } {
     pass "$test: compiled $test.c"
 }
 
+set ::result_string {systemtap starting probe
+systemtap ending probe
+systemtap test success}
+
 if { ![catch { exec eu-readelf -w $test | grep entry_value: }] } {
-    stap_run $test no_load $all_pass_string $srcdir/$subdir/$test.stp -c ./${test} -w
+    stap_run2 $srcdir/$subdir/$test.stp -c ./${test} -w
 } else {
     untested "$test: no DW_OP_GNU_entry_value found"
 }
This page took 0.026728 seconds and 5 git commands to generate.