doc/SystemTap_Beginners_Guide/testsuite/systemtap.base/modinfo.exp
raw| 1 | set test modinfo |
| 2 | |
| 3 | set module [exec stap --modinfo foo=bar -p4 -e "probe begin { exit() }"] |
| 4 | if [file exists $module] { pass "$test compilation" } else { fail "$test compilation"; return } |
| 5 | |
| 6 | set ok 0 |
| 7 | set ko 0 |
| 8 | spawn /sbin/modinfo $module |
| 9 | expect { |
| 10 | -re {^foo:[ ]*bar\r\n} { incr ok; exp_continue } |
| 11 | -re {^[a-zA-Z0-9_]*:[^\r\n]*\r\n} { exp_continue } |
| 12 | eof { } |
| 13 | } |
| 14 | catch { close }; catch { wait } |
| 15 | if {$ok == 1} { pass "$test modinfo" } else { fail "$test modinfo ($ok $ko)" } |