public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 5/6] SNMP tapset
@ 2009-07-07  3:04 David J. Wilder
  0 siblings, 0 replies; only message in thread
From: David J. Wilder @ 2009-07-07  3:04 UTC (permalink / raw)
  To: systemtap

These are tests for the snmp set of tapsets.

Signed-off-by: David Wilder <dwilder@us.ibm.com>

------------------------------------------------------
 testsuite/buildok/ipmib-all-probes.stp    |   15 +++++++++++++++
 testsuite/buildok/linuxmib-all-probes.stp |    9 +++++++++
 testsuite/buildok/tcpmib-all-probes.stp   |   15 +++++++++++++++
 3 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/testsuite/buildok/ipmib-all-probes.stp b/testsuite/buildok/ipmib-all-probes.stp
new file mode 100644
index 0000000..b6bedcf
--- /dev/null
+++ b/testsuite/buildok/ipmib-all-probes.stp
@@ -0,0 +1,15 @@
+#! stap -p4
+
+// Tests if all probes in the ipmib tapset are resolvable.
+
+probe ipmib.* {}
+
+function ipmib_filter_key:long (skb:long, op:long, SourceIsLocal:long) {
+	// Insure all these functions will build
+	if ( ipmib_remote_addr(skb, SourceIsLocal) ) return 0
+	if ( ipmib_local_addr(skb, SourceIsLocal) ) return 0
+	if ( ipmib_tcp_remote_port(skb, SourceIsLocal) ) return 0
+	if ( ipmib_tcp_local_port(skb, SourceIsLocal) ) return 0
+	if ( ipmib_get_proto(skb) ) return 0
+	return op
+}
diff --git a/testsuite/buildok/linuxmib-all-probes.stp b/testsuite/buildok/linuxmib-all-probes.stp
new file mode 100644
index 0000000..c79fc7d
--- /dev/null
+++ b/testsuite/buildok/linuxmib-all-probes.stp
@@ -0,0 +1,9 @@
+#! stap -p4
+
+// Tests if all probes in the linuxmib tapset are resolvable.
+
+probe linuxmib.* {}
+
+function linuxmib_filter_key:long (sk:long, op:long) {
+	return 0
+}
diff --git a/testsuite/buildok/tcpmib-all-probes.stp b/testsuite/buildok/tcpmib-all-probes.stp
new file mode 100644
index 0000000..f20ba8b
--- /dev/null
+++ b/testsuite/buildok/tcpmib-all-probes.stp
@@ -0,0 +1,15 @@
+#! stap -p4
+
+// Tests if all probes in the tcpmib tapset are resolvable.
+
+probe tcpmib.* {}
+
+function tcpmib_filter_key:long (sk:long, op:long) {
+	// Insure all these functions will build
+	if ( tcpmib_get_state(sk) ) return 0
+	if ( tcpmib_local_addr(sk) ) return 0
+	if ( tcpmib_remote_addr(sk) ) return 0
+	if ( tcpmib_local_port(sk) ) return 0
+	if ( tcpmib_remote_port(sk) ) return 0
+	return op
+}


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-07-07  3:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-07  3:04 [PATCH 5/6] SNMP tapset David J. Wilder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).