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