summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rwxr-xr-xtestsuite/buildok/tcp_test.stp41
2 files changed, 45 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 23a76e98..abbc9591 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-06-22 Thang P Nguyen <thang.p.nguyen@intel.com>
+
+ * testsuite/buildok/tcp_test.stp: test tcp tapset
+
2006-06-16 Roland McGrath <roland@redhat.com>
* configure.ac, systemtap.spec.in: Bump version to 0.5.8.
diff --git a/testsuite/buildok/tcp_test.stp b/testsuite/buildok/tcp_test.stp
new file mode 100755
index 00000000..26d9bb94
--- /dev/null
+++ b/testsuite/buildok/tcp_test.stp
@@ -0,0 +1,41 @@
+#! stap -p4
+global send_bytes, recv_bytes, ports, src_ips, rtos, state, mss, ssthresh, cwnd
+
+function print_report()
+{
+ printf("%d\t%d\t%d\t%s\t%d\t%d\t%d\t%d\t%d\n",
+ send_bytes,recv_bytes,ports,src_ips,rtos,mss,ssthresh,cwnd,state);
+}
+
+probe tcp.sendmsg {
+ ports = tcp_get_local_port(sk)
+ src_ips = tcp_get_ip_source(sk)
+ rtos = tcp_get_info_rto(sk)
+}
+
+probe tcp.recvmsg {
+ cwnd = tcp_get_info_snd_cwnd(sk)
+ mss = tcp_ts_get_info_rcv_mss(sk)
+ ssthresh = tcp_ts_get_info_snd_ssthresh(sk)
+ state = tcp_ts_get_info_state(sk)
+}
+
+probe tcp.sendmsg.return {
+ if (size > 0) {
+ send_bytes += size
+ }
+}
+
+probe tcp.recvmsg.return {
+ if (size > 0) {
+ recv_bytes += size
+ }
+}
+
+probe tcp.disconnect {
+ log("tcp disconnect")
+}
+
+probe timer.ms(2000) {
+ print_report()
+}