summaryrefslogtreecommitdiffstats
path: root/testsuite/buildok
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/buildok')
-rwxr-xr-xtestsuite/buildok/tcp_test.stp4
-rwxr-xr-xtestsuite/buildok/udp_test.stp32
2 files changed, 34 insertions, 2 deletions
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()
+}