diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rwxr-xr-x | testsuite/buildok/tcp_test.stp | 4 | ||||
-rwxr-xr-x | testsuite/buildok/udp_test.stp | 32 |
3 files changed, 39 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2006-06-23 Thang P Nguyen <thang.p.nguyen@intel.com> + + * testsuite/buildok/tcp_test.stp: updated inet calls + * testsuite/buildok/udp_test.stp: test udp tapset + 2006-06-22 Thang P Nguyen <thang.p.nguyen@intel.com> * testsuite/buildok/tcp_test.stp: test tcp tapset diff --git a/testsuite/buildok/tcp_test.stp b/testsuite/buildok/tcp_test.stp index 26d9bb94..a262ab29 100755 --- a/testsuite/buildok/tcp_test.stp +++ b/testsuite/buildok/tcp_test.stp @@ -8,8 +8,8 @@ function print_report() } probe tcp.sendmsg { - ports = tcp_get_local_port(sk) - src_ips = tcp_get_ip_source(sk) + ports = inet_get_local_port(sk) + src_ips = inet_get_ip_source(sk) rtos = tcp_get_info_rto(sk) } diff --git a/testsuite/buildok/udp_test.stp b/testsuite/buildok/udp_test.stp new file mode 100755 index 00000000..58466469 --- /dev/null +++ b/testsuite/buildok/udp_test.stp @@ -0,0 +1,32 @@ +#! stap -p4 +global send_bytes,recv_bytes,ports,src_ips + +function print_report() +{ + printf("%d\t%d\t%d\t%s\n",send_bytes,recv_bytes,ports,src_ips); +} + +probe udp.sendmsg { + ports = inet_get_local_port(sock) + src_ips = inet_get_ip_source(sock) +} + +probe udp.sendmsg.return { + if (size > 0) { + send_bytes += size + } +} + +probe udp.recvmsg.return { + if (size > 0) { + recv_bytes += size + } +} + +probe udp.disconnect { + log("tcp disconnect") +} + +probe timer.ms(2000) { + print_report() +} |