From 04930c203ab0172159973cfbe29fac39658ea608 Mon Sep 17 00:00:00 2001 From: zhaolei Date: Sun, 30 Sep 2007 23:54:56 +0000 Subject: 2007-10-01 Zhaolei * socket.stp (_success_check): Fix compare method. --- tapset/ChangeLog | 4 ++++ tapset/socket.stp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tapset/ChangeLog b/tapset/ChangeLog index 59a73895..30068cde 100644 --- a/tapset/ChangeLog +++ b/tapset/ChangeLog @@ -1,3 +1,7 @@ +2007-10-01 Zhaolei + + * socket.stp (_success_check): Fix compare method. + 2007-09-27 Martin Hunt * aux_syscalls.stp (_stp_lookup_str, _stp_lookup_or_str): diff --git a/tapset/socket.stp b/tapset/socket.stp index e18d99ee..77e322d2 100644 --- a/tapset/socket.stp +++ b/tapset/socket.stp @@ -898,7 +898,7 @@ probe begin(-1001) function _success_check(ret:long) { - return (ret > 0 ? 1 : 0) + return (ret >= 0 ? 1 : 0) } function _get_sock_addr:long (file:long) -- cgit From c1c10f4b459dcd39c6d9d62cf902d20b455bfc08 Mon Sep 17 00:00:00 2001 From: hunt Date: Mon, 1 Oct 2007 15:28:12 +0000 Subject: 2007-10-01 Martin Hunt * aux_syscalls.stp (_str_lookup_str): Print unmatched values in hex. --- tapset/ChangeLog | 5 +++++ tapset/aux_syscalls.stp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tapset/ChangeLog b/tapset/ChangeLog index 30068cde..c9a0bf93 100644 --- a/tapset/ChangeLog +++ b/tapset/ChangeLog @@ -1,3 +1,8 @@ +2007-10-01 Martin Hunt + + * aux_syscalls.stp (_str_lookup_str): Print unmatched + values in hex. + 2007-10-01 Zhaolei * socket.stp (_success_check): Fix compare method. diff --git a/tapset/aux_syscalls.stp b/tapset/aux_syscalls.stp index cb47464f..23284db8 100644 --- a/tapset/aux_syscalls.stp +++ b/tapset/aux_syscalls.stp @@ -1558,7 +1558,7 @@ void _stp_lookup_str(const _stp_val_array * const array, long val, char *ptr, in } i++; } - snprintf(ptr, len, "%ld", val); + snprintf(ptr, len, "0x%lx", val); } void _stp_lookup_or_str(const _stp_val_array * const array, long val, char *ptr, int len) { -- cgit From b71a5cbb7521034d43523096c890e5d9bd05e79c Mon Sep 17 00:00:00 2001 From: hunt Date: Mon, 1 Oct 2007 15:29:27 +0000 Subject: 2007-10-01 Martin Hunt * test.tcl (run_one_test): Append newlines when using send_log(). --- testsuite/systemtap.syscall/ChangeLog | 5 +++++ testsuite/systemtap.syscall/test.tcl | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/testsuite/systemtap.syscall/ChangeLog b/testsuite/systemtap.syscall/ChangeLog index c8953b80..9811a707 100644 --- a/testsuite/systemtap.syscall/ChangeLog +++ b/testsuite/systemtap.syscall/ChangeLog @@ -1,3 +1,8 @@ +2007-10-01 Martin Hunt + + * test.tcl (run_one_test): Append newlines when + using send_log(). + 2007-09-25 Martin Hunt * test.tcl (run_one_test): Fix unsupported results. diff --git a/testsuite/systemtap.syscall/test.tcl b/testsuite/systemtap.syscall/test.tcl index 5d1db2a3..fe16358d 100755 --- a/testsuite/systemtap.syscall/test.tcl +++ b/testsuite/systemtap.syscall/test.tcl @@ -89,27 +89,27 @@ proc run_one_test {filename flags} { } else { set result "FAIL $testname" send_log "$testname FAILED. output of \"$cmd\" was:" - send_log "------------------------------------------" + send_log "\n------------------------------------------\n" send_log $output - send_log "------------------------------------------" - send_log "RESULTS: (\'*\' = MATCHED EXPECTED)" + send_log "\n------------------------------------------\n" + send_log "RESULTS: (\'*\' = MATCHED EXPECTED)\n" set i 0 foreach line [split $output "\n"] { if {[regexp "${testname}: " $line]} { if {[regexp $results($i) $line]} { - send_log "*$line" + send_log "*$line\n" incr i if {$i >= $ind} {break} } else { - send_log "$line" + send_log "$line\n" } } } if {$i < $ind} { - send_log "--------- EXPECTED and NOT MATCHED ----------" + send_log "--------- EXPECTED and NOT MATCHED ----------\n" } for {} {$i < $ind} {incr i} { - send_log "$results($i)" + send_log "$results($i)\n" } } cleanup -- cgit