summaryrefslogtreecommitdiffstats
path: root/testsuite/buildok/gtod_init.stp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/buildok/gtod_init.stp')
-rwxr-xr-xtestsuite/buildok/gtod_init.stp13
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/buildok/gtod_init.stp b/testsuite/buildok/gtod_init.stp
new file mode 100755
index 00000000..1d76aeab
--- /dev/null
+++ b/testsuite/buildok/gtod_init.stp
@@ -0,0 +1,13 @@
+#! stap -gp4
+
+# check that STAP_NEED_GETTIMEOFDAY is defined with a gettimeofday
+function check() %{
+#ifndef STAP_NEED_GETTIMEOFDAY
+#error "gettimeofday should define STAP_NEED_GETTIMEOFDAY!"
+#endif
+%}
+
+probe begin {
+ check()
+ println(gettimeofday_s())
+}