summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/kmodule.exp
blob: 05f464f855d0fc14cd7aaf6836e731e815eb27c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Simple function to test that systemtap can generate instument a module
# function, install it, and get some output.

load_lib "stap_run.exp"

set test "kmodule"

proc kmodule_load {} {
    # force the filesystem to be synced
    if {[lindex [local_exec "sync" "" "" 100] 0] == 0} {
	return 0
    } else {
	return 1
    }
}

# better have a count other than zero to show that probe fired
set output_string "count = \[0-9\]\[0-9\]*\r\n"

#make sure have ext3 module loaded before trying this

stap_run $srcdir/$subdir/$test.stp kmodule_load $output_string