[DTrace-devel] [PATCH] test: Clean up tst.coverage.d

eugene.loh at oracle.com eugene.loh at oracle.com
Thu Nov 2 22:36:44 UTC 2023


From: Eugene Loh <eugene.loh at oracle.com>

The .t file was not executable and therefore not being used.
Further, the .d test specifies another @@trigger explicitly.
So remove the unused .t file.

Clean the .d file up a little, mostly to use aggregations and
thereby reduce the volume of output.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
---
 test/unittest/pid/tst.coverage.d | 16 ++++------------
 test/unittest/pid/tst.coverage.t |  8 --------
 2 files changed, 4 insertions(+), 20 deletions(-)
 delete mode 100644 test/unittest/pid/tst.coverage.t

diff --git a/test/unittest/pid/tst.coverage.d b/test/unittest/pid/tst.coverage.d
index 9670665a..3313d7b5 100644
--- a/test/unittest/pid/tst.coverage.d
+++ b/test/unittest/pid/tst.coverage.d
@@ -1,6 +1,6 @@
 /*
  * Oracle Linux DTrace.
- * Copyright (c) 2006, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 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.
  */
@@ -13,22 +13,14 @@
  * ASSERTION: test that we can trace every instruction safely
  *
  * SECTION: pid provider
- *
  */
 
-BEGIN
+pid$1:a.out::
 {
-	/*
-	 * Let's just do this for 2 seconds.
-	 */
-	timeout = timestamp + 2000000000;
+	@[probename] = count();
 }
 
-pid$1:a.out::
-{}
-
-profile:::tick-4
-/timestamp > timeout/
+profile:::tick-2sec
 {
 	exit(0);
 }
diff --git a/test/unittest/pid/tst.coverage.t b/test/unittest/pid/tst.coverage.t
deleted file mode 100644
index ac05014b..00000000
--- a/test/unittest/pid/tst.coverage.t
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-#
-# Oracle Linux DTrace.
-# Copyright (c) 2006, 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.
-#
-while true; do env > /dev/null; done
-- 
2.18.4




More information about the DTrace-devel mailing list