From 1392896dcda33324d43392f8e99fed240cf5fb9b Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Mon, 24 Aug 2009 10:34:45 -0400 Subject: PR4186: cross-architecture probe building * main.cxx (main): Add 'a:' and 'B:' options. * session.h (kbuildflags): New place to store -B args. * testsuite/systemtap.base/cmd_parse.exp: Test them lightly. * buildrun.cxx (run_make_cmd): Use "--no-print-directory" rather than ">/dev/null" in kbuild invocations. Pass '-a' and '-B' flags along. * hash.cxx (find_script_hash): Add them. * NEWS, stap.1.in: Mention this. --- testsuite/systemtap.base/cmd_parse.exp | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'testsuite/systemtap.base') diff --git a/testsuite/systemtap.base/cmd_parse.exp b/testsuite/systemtap.base/cmd_parse.exp index 7f5f70d9..8824e6c4 100644 --- a/testsuite/systemtap.base/cmd_parse.exp +++ b/testsuite/systemtap.base/cmd_parse.exp @@ -1,5 +1,5 @@ if {![installtest_p]} { - for {set i 0} { $i < 8} {incr i} { + for {set i 0} { $i < 16} {incr i} { untested cmd_parse$i } return @@ -129,3 +129,29 @@ expect { eof { fail "cmd_parse14: eof" } } wait;catch {close} + +set uname [exec uname -r] +spawn sh -c "stap -m do_not_cache_me -B kernelrelease -p4 -e 'probe begin {exit()}'" +# the \r below is meant to match the "kernelrelease" output, as distinct from +# any possible auxiliary make verbosity. +expect { + -re "$uname\r" { pass "cmd_parse15" } + timeout { fail "cmd_parse15: timeout" } + eof { fail "cmd_parse15: eof" } +} +wait;catch {close} + +set uname [exec uname -m] +spawn sh -c "stap -m do_not_cache_me -a $uname -p4 -e 'probe begin {exit()}'" +# the \r below is meant to match the "kernelrelease" output, as distinct from +# any possible auxiliary make verbosity. +expect { + -re "do_not_cache_me.ko\r" { pass "cmd_parse16" } + timeout { fail "cmd_parse16: timeout" } + eof { fail "cmd_parse16: eof" } +} +wait;catch {close} + + +# NB: when adding extra tests here, increment the ![installtest_p] +# loop count too at the top. -- cgit