]> sourceware.org Git - systemtap.git/commitdiff
2007-06-14 Martin Hunt <hunt@redhat.com>
authorhunt <hunt>
Thu, 14 Jun 2007 15:32:14 +0000 (15:32 +0000)
committerhunt <hunt>
Thu, 14 Jun 2007 15:32:14 +0000 (15:32 +0000)
* systemtap.samples/syscalls.stp: Use printf
for output to avoid problems with long paths.

 From Quentin Barnes.
* systemtap.samples/system_func.exp: Change expect matching.

testsuite/ChangeLog
testsuite/systemtap.samples/syscalls.stp
testsuite/systemtap.samples/system_func.exp

index 2cc3b0bac2dbdd6929cfc89c3291612598c04496..4bdd6560883ca81acbfc25654af5a41cc61d24f8 100644 (file)
@@ -1,3 +1,11 @@
+2007-06-14  Martin Hunt  <hunt@redhat.com>
+
+       * systemtap.samples/syscalls.stp: Use printf
+       for output to avoid problems with long paths.
+
+        From Quentin Barnes.
+       * systemtap.samples/system_func.exp: Change expect matching.
+       
 2007-06-14  David Smith  <dsmith@redhat.com>
 
        * systemtap.samples/profile.stp: Change output to avoid problems
index 68e0348aa6ecca88d013c6a9d2ba145e2f11b0dc..3ccfb8e5225393628963388a6d903fd99ecc5c0d 100644 (file)
@@ -2,6 +2,6 @@
 
 global count
 probe kernel.function("sys_*").call {
-  print (sprint(pid()) . " " . pp() . "\n")
-  if (++count > 100) exit()
+       printf("%d %s\n", pid(), pp())
+       if (++count > 100) exit()
 }
index d191e872da2747f3d2d0d7384a9e90331c6a08b8..ec935783741ef474c15b3b138bf3d48119e3bada 100644 (file)
@@ -7,9 +7,14 @@ set saw_user 0
 set user [exec whoami]
 expect {
     -timeout 30
-    -re "^$user\[^\r\]*\[\r\n\]*" {incr saw_user; exp_continue}
-    -re {^sys_open[^\r]*[\r\n]*} {incr open; exp_continue }
-    -re {DONE[^\r]*[\r\n]*} {incr done; exp_continue }
+    -re "($user|sys_open|DONE)\r" {
+       switch $expect_out(1,string) {
+           sys_open {incr open}
+           DONE     {incr done}
+           default  {incr saw_user}
+       }
+       exp_continue
+    }
     timeout { fail "$test (timeout)" }
     eof { }
 }
This page took 0.0276 seconds and 5 git commands to generate.