diff options
Diffstat (limited to 'testsuite/systemtap.base/probe_list.exp')
-rw-r--r-- | testsuite/systemtap.base/probe_list.exp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/systemtap.base/probe_list.exp b/testsuite/systemtap.base/probe_list.exp new file mode 100644 index 00000000..b3e6884b --- /dev/null +++ b/testsuite/systemtap.base/probe_list.exp @@ -0,0 +1,19 @@ +# This test ensures that "-l" lists only include probe names, and not any of +# the local variables. There was a bug that "-l" would print variables that +# couldn't be optimized away, due to an incorrect assumption in the +# implementation. + +# NB: This is a bit abusively formed. Currently -l internally writes "probe" +# and "{}" around its argument. For this test we want to introduce a variable +# that can't be optimized away. The trailing comment mark lets the auto "{}" +# get ignored. +spawn stap -l "begin { if (a) next }#" + +expect { + # the output should not include anything else, like the 'a' local. + -re "^begin\r\n$" { + pass "probe list is correct" + return + } +} +fail "probe list is incorrect" |