summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/ChangeLog5
-rw-r--r--testsuite/systemtap.context/num_args.tcl5
-rw-r--r--util.cxx1
3 files changed, 10 insertions, 1 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index d0a3a4f4..658e9c98 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-12 David Smith <dsmith@redhat.com>
+
+ * systemtap.context/num_args.tcl: Improved error handling of
+ testcase.
+
2008-11-03 Wenji Huang <wenji.huang@oracle.com>
* systemtap.base/cmd_parse.exp: Add exit() to probe.
diff --git a/testsuite/systemtap.context/num_args.tcl b/testsuite/systemtap.context/num_args.tcl
index 48e83f4d..7d12b433 100644
--- a/testsuite/systemtap.context/num_args.tcl
+++ b/testsuite/systemtap.context/num_args.tcl
@@ -54,9 +54,12 @@ expect {
timeout {fail "string function arguments -- $tag"}
}
}
+ -re "semantic error:" {
+ fail "function arguments -- $tag: compilation failed"
+ }
eof {fail "function arguments -- $tag: unexpected timeout"}
}
exec kill -INT -[exp_pid]
-close
+catch close
wait
}
diff --git a/util.cxx b/util.cxx
index a5f77c06..42f0beb5 100644
--- a/util.cxx
+++ b/util.cxx
@@ -24,6 +24,7 @@ extern "C" {
#include <sys/stat.h>
#include <pwd.h>
#include <unistd.h>
+#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
}