[DTrace-devel] [PATCH v2] test: Add test for option "quiet" (and -q)

Kris Van Hees kris.van.hees at oracle.com
Fri Apr 28 05:18:36 UTC 2023


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 +
 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

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 @@
+



More information about the DTrace-devel mailing list