test: Add ERROR clause to prevent hang from runtime error
PATCH 1/1 test: Add ERROR clause to prevent hang from runtime error
From: Eugene Loh <[email protected]>
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 <[email protected]>
--- 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(-)
test/unittest/funcs/strtok/tst.strtok.d +7 -1
@@ -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); +}
test/unittest/funcs/substr/tst.substr.d +7 -1
@@ -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); +}
test/unittest/types/tst.struct.d +7 -1
@@ -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); +}
test/unittest/types/tst.typedef.d +7 -1
@@ -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); +}
Signature · 1 line
2.47.3
Quoted 8 lines · On Fri, Jan 16, 2026 at 09:57:59PM -0500, [email protected] wrote:
From: Eugene Loh <[email protected]>
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 <[email protected]>
Reviewed-by Kris Van Hees <[email protected]>
Quoted 98 lines
--- 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(-)test/unittest/funcs/strtok/tst.strtok.d +7
-1@@ -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); +}test/unittest/funcs/substr/tst.substr.d +7
-1@@ -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); +}test/unittest/types/tst.struct.d +7
-1@@ -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); +}test/unittest/types/tst.typedef.d +7
-1@@ -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); +}Signature · 1 line
2.47.3