[DTrace-devel] [PATCH] test: Add test for option "quiet" (and -q)
Kris Van Hees
kris.van.hees at oracle.com
Fri Mar 3 04:45:26 UTC 2023
Also remove (incorrect) tst.quite.d test.
Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
---
test/unittest/options/tst.q.d | 19 +++++++++++++++++++
test/unittest/options/tst.q.r | 1 +
test/unittest/options/tst.quiet.d | 20 ++++++++++++++++++++
test/unittest/options/tst.quiet.r | 1 +
test/unittest/scripting/tst.quite.d | 21 ---------------------
test/unittest/scripting/tst.quite.r | 5 -----
6 files changed, 41 insertions(+), 26 deletions(-)
create mode 100644 test/unittest/options/tst.q.d
create mode 100644 test/unittest/options/tst.q.r
create mode 100644 test/unittest/options/tst.quiet.d
create mode 100644 test/unittest/options/tst.quiet.r
delete mode 100644 test/unittest/scripting/tst.quite.d
delete mode 100644 test/unittest/scripting/tst.quite.r
diff --git a/test/unittest/options/tst.q.d b/test/unittest/options/tst.q.d
new file mode 100644
index 00000000..34e21e93
--- /dev/null
+++ b/test/unittest/options/tst.q.d
@@ -0,0 +1,19 @@
+/*
+ * Oracle Linux DTrace.
+ * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+ * Licensed under the Universal Permissive License v 1.0 as shown at
+ * http://oss.oracle.com/licenses/upl.
+ */
+
+/*
+ * ASSERTION: The -q option can be used to output only explicitly traced data.
+ *
+ * SECTION: Options and Tunables/Consumer Options
+ */
+
+/* @@runtest-opts: -q */
+
+BEGIN
+{
+ exit(0);
+}
diff --git a/test/unittest/options/tst.q.r b/test/unittest/options/tst.q.r
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/test/unittest/options/tst.q.r
@@ -0,0 +1 @@
+
diff --git a/test/unittest/options/tst.quiet.d b/test/unittest/options/tst.quiet.d
new file mode 100644
index 00000000..2aed2597
--- /dev/null
+++ b/test/unittest/options/tst.quiet.d
@@ -0,0 +1,20 @@
+/*
+ * Oracle Linux DTrace.
+ * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+ * Licensed under the Universal Permissive License v 1.0 as shown at
+ * http://oss.oracle.com/licenses/upl.
+ */
+
+/*
+ * ASSERTION: The -xquiet option can be used to output only explicitly traced
+ * data.
+ *
+ * SECTION: Options and Tunables/Consumer Options
+ */
+
+/* @@runtest-opts: -xquiet */
+
+BEGIN
+{
+ exit(0);
+}
diff --git a/test/unittest/options/tst.quiet.r b/test/unittest/options/tst.quiet.r
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/test/unittest/options/tst.quiet.r
@@ -0,0 +1 @@
+
diff --git a/test/unittest/scripting/tst.quite.d b/test/unittest/scripting/tst.quite.d
deleted file mode 100644
index 46402cbd..00000000
--- a/test/unittest/scripting/tst.quite.d
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/sbin/dtrace -qs
-
-/*
- * Oracle Linux DTrace.
- * Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
- * Licensed under the Universal Permissive License v 1.0 as shown at
- * http://oss.oracle.com/licenses/upl.
- */
-
-/*
- * ASSERTION:
- * Script which uses -qs in scripting line
- *
- * SECTION: Scripting
- *
- */
-
-BEGIN
-{
- exit(0);
-}
diff --git a/test/unittest/scripting/tst.quite.r b/test/unittest/scripting/tst.quite.r
deleted file mode 100644
index b7bc367e..00000000
--- a/test/unittest/scripting/tst.quite.r
+++ /dev/null
@@ -1,5 +0,0 @@
- FUNCTION:NAME
- :BEGIN
-
--- @@stderr --
-dtrace: script 'test/unittest/scripting/tst.quite.d' matched 1 probe
--
2.39.1
More information about the DTrace-devel
mailing list