* [PATCH] test: Add ERROR clause to prevent hang from runtime error
@ 2026-01-17 2:57 eugene.loh
2026-01-17 15:56 ` Kris Van Hees
0 siblings, 1 reply; 2+ messages in thread
From: eugene.loh @ 2026-01-17 2:57 UTC (permalink / raw)
To: dtrace, dtrace-devel
From: Eugene Loh <eugene.loh@oracle.com>
These tests XFAIL. Since they incur runtime failures, the scripts hang,
waiting for the test suite to time them out.
Add an ERROR clause to each test, so that XFAILs do not hang needlessly.
Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
---
test/unittest/funcs/strtok/tst.strtok.d | 8 +++++++-
test/unittest/funcs/substr/tst.substr.d | 8 +++++++-
test/unittest/types/tst.struct.d | 8 +++++++-
test/unittest/types/tst.typedef.d | 8 +++++++-
4 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/test/unittest/funcs/strtok/tst.strtok.d b/test/unittest/funcs/strtok/tst.strtok.d
index 8ffe1066..b39e44bc 100644
--- a/test/unittest/funcs/strtok/tst.strtok.d
+++ b/test/unittest/funcs/strtok/tst.strtok.d
@@ -1,6 +1,6 @@
/*
* Oracle Linux DTrace.
- * Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2026, 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.
*/
@@ -124,3 +124,9 @@ tick-1ms
{
exit(0);
}
+
+ERROR
+{
+ printf("ERROR\n");
+ exit(1);
+}
diff --git a/test/unittest/funcs/substr/tst.substr.d b/test/unittest/funcs/substr/tst.substr.d
index 4dcef73b..580dfa0f 100644
--- a/test/unittest/funcs/substr/tst.substr.d
+++ b/test/unittest/funcs/substr/tst.substr.d
@@ -1,6 +1,6 @@
/*
* Oracle Linux DTrace.
- * Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2026, 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.
*/
@@ -209,3 +209,9 @@ tick-1ms
printf("\texit($failed);\n}\n");
exit(0);
}
+
+ERROR
+{
+ printf("ERROR\n");
+ exit(1);
+}
diff --git a/test/unittest/types/tst.struct.d b/test/unittest/types/tst.struct.d
index 627a8585..77499789 100644
--- a/test/unittest/types/tst.struct.d
+++ b/test/unittest/types/tst.struct.d
@@ -1,6 +1,6 @@
/*
* Oracle Linux DTrace.
- * Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2026, 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.
*/
@@ -49,3 +49,9 @@ BEGIN
exit(0);
}
+
+ERROR
+{
+ printf("ERROR\n");
+ exit(1);
+}
diff --git a/test/unittest/types/tst.typedef.d b/test/unittest/types/tst.typedef.d
index 744c93c2..7ec3bcd3 100644
--- a/test/unittest/types/tst.typedef.d
+++ b/test/unittest/types/tst.typedef.d
@@ -1,6 +1,6 @@
/*
* Oracle Linux DTrace.
- * Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2026, 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.
*/
@@ -49,3 +49,9 @@ BEGIN
exit(0);
}
+
+ERROR
+{
+ printf("ERROR\n");
+ exit(1);
+}
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] test: Add ERROR clause to prevent hang from runtime error
2026-01-17 2:57 [PATCH] test: Add ERROR clause to prevent hang from runtime error eugene.loh
@ 2026-01-17 15:56 ` Kris Van Hees
0 siblings, 0 replies; 2+ messages in thread
From: Kris Van Hees @ 2026-01-17 15:56 UTC (permalink / raw)
To: eugene.loh; +Cc: dtrace, dtrace-devel
On Fri, Jan 16, 2026 at 09:57:59PM -0500, eugene.loh@oracle.com wrote:
> From: Eugene Loh <eugene.loh@oracle.com>
>
> These tests XFAIL. Since they incur runtime failures, the scripts hang,
> waiting for the test suite to time them out.
>
> Add an ERROR clause to each test, so that XFAILs do not hang needlessly.
>
> Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
> ---
> test/unittest/funcs/strtok/tst.strtok.d | 8 +++++++-
> test/unittest/funcs/substr/tst.substr.d | 8 +++++++-
> test/unittest/types/tst.struct.d | 8 +++++++-
> test/unittest/types/tst.typedef.d | 8 +++++++-
> 4 files changed, 28 insertions(+), 4 deletions(-)
>
> diff --git a/test/unittest/funcs/strtok/tst.strtok.d b/test/unittest/funcs/strtok/tst.strtok.d
> index 8ffe1066..b39e44bc 100644
> --- a/test/unittest/funcs/strtok/tst.strtok.d
> +++ b/test/unittest/funcs/strtok/tst.strtok.d
> @@ -1,6 +1,6 @@
> /*
> * Oracle Linux DTrace.
> - * Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2006, 2026, 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.
> */
> @@ -124,3 +124,9 @@ tick-1ms
> {
> exit(0);
> }
> +
> +ERROR
> +{
> + printf("ERROR\n");
> + exit(1);
> +}
> diff --git a/test/unittest/funcs/substr/tst.substr.d b/test/unittest/funcs/substr/tst.substr.d
> index 4dcef73b..580dfa0f 100644
> --- a/test/unittest/funcs/substr/tst.substr.d
> +++ b/test/unittest/funcs/substr/tst.substr.d
> @@ -1,6 +1,6 @@
> /*
> * Oracle Linux DTrace.
> - * Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2008, 2026, 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.
> */
> @@ -209,3 +209,9 @@ tick-1ms
> printf("\texit($failed);\n}\n");
> exit(0);
> }
> +
> +ERROR
> +{
> + printf("ERROR\n");
> + exit(1);
> +}
> diff --git a/test/unittest/types/tst.struct.d b/test/unittest/types/tst.struct.d
> index 627a8585..77499789 100644
> --- a/test/unittest/types/tst.struct.d
> +++ b/test/unittest/types/tst.struct.d
> @@ -1,6 +1,6 @@
> /*
> * Oracle Linux DTrace.
> - * Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2006, 2026, 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.
> */
> @@ -49,3 +49,9 @@ BEGIN
>
> exit(0);
> }
> +
> +ERROR
> +{
> + printf("ERROR\n");
> + exit(1);
> +}
> diff --git a/test/unittest/types/tst.typedef.d b/test/unittest/types/tst.typedef.d
> index 744c93c2..7ec3bcd3 100644
> --- a/test/unittest/types/tst.typedef.d
> +++ b/test/unittest/types/tst.typedef.d
> @@ -1,6 +1,6 @@
> /*
> * Oracle Linux DTrace.
> - * Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2006, 2026, 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.
> */
> @@ -49,3 +49,9 @@ BEGIN
>
> exit(0);
> }
> +
> +ERROR
> +{
> + printf("ERROR\n");
> + exit(1);
> +}
> --
> 2.47.3
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-17 15:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-17 2:57 [PATCH] test: Add ERROR clause to prevent hang from runtime error eugene.loh
2026-01-17 15:56 ` Kris Van Hees
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox