public inbox for dtrace@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] test: expected results files should not be executable scripts
@ 2026-01-16 23:11 Kris Van Hees
  2026-01-17  2:06 ` Eugene Loh
  0 siblings, 1 reply; 3+ messages in thread
From: Kris Van Hees @ 2026-01-16 23:11 UTC (permalink / raw)
  To: dtrace

Tthese tests generated a bash or perl script as output, but given that
the associated .r files are not meant ot be executable, do not emit a
that looks like a script is not executable.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
---
 test/unittest/funcs/substr/tst.substr.d | 2 +-
 test/unittest/funcs/substr/tst.substr.r | 2 --
 test/unittest/funcs/tst.basename.d      | 4 +---
 test/unittest/funcs/tst.basename.r      | 2 --
 test/unittest/funcs/tst.index.d         | 2 +-
 test/unittest/funcs/tst.index.r         | 2 --
 6 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/test/unittest/funcs/substr/tst.substr.d b/test/unittest/funcs/substr/tst.substr.d
index 8da15c30..4dcef73b 100644
--- a/test/unittest/funcs/substr/tst.substr.d
+++ b/test/unittest/funcs/substr/tst.substr.d
@@ -153,7 +153,7 @@ BEGIN
 
 	end = i;
 	i = 0;
-	printf("#!/usr/bin/perl\n\nBEGIN {\n");
+	printf("BEGIN {\n");
 
 }
 
diff --git a/test/unittest/funcs/substr/tst.substr.r b/test/unittest/funcs/substr/tst.substr.r
index 94d94e74..285b5c19 100644
--- a/test/unittest/funcs/substr/tst.substr.r
+++ b/test/unittest/funcs/substr/tst.substr.r
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
 BEGIN {
 	if (substr("foobarbazbop", 3) ne "barbazbop") {
 		printf("perl => substr(\"foobarbazbop\", 3) = \"%s\"\n",
diff --git a/test/unittest/funcs/tst.basename.d b/test/unittest/funcs/tst.basename.d
index 86d80873..2b3d098a 100644
--- a/test/unittest/funcs/tst.basename.d
+++ b/test/unittest/funcs/tst.basename.d
@@ -1,6 +1,6 @@
 /*
  * Oracle Linux DTrace.
- * Copyright (c) 2006, 2023, 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.
  */
@@ -38,8 +38,6 @@ BEGIN
 
 	end = i;
 	i = 0;
-
-	printf("#!/bin/bash\n\n");
 }
 
 syscall::ioctl:entry
diff --git a/test/unittest/funcs/tst.basename.r b/test/unittest/funcs/tst.basename.r
index 4f3aa0cc..fb68c543 100644
--- a/test/unittest/funcs/tst.basename.r
+++ b/test/unittest/funcs/tst.basename.r
@@ -1,5 +1,3 @@
-#!/bin/bash
-
 if [ `basename "/foo/bar/baz"` != "baz" ]; then
 	echo "basename(\"/foo/bar/baz\") is \"baz\"; expected \"`basename "/foo/bar/baz"`"\"
 fi
diff --git a/test/unittest/funcs/tst.index.d b/test/unittest/funcs/tst.index.d
index aab920eb..a918c386 100644
--- a/test/unittest/funcs/tst.index.d
+++ b/test/unittest/funcs/tst.index.d
@@ -60,7 +60,7 @@ BEGIN
 	i++;
 
 	end = j = k = 0;
-	printf("#!/usr/bin/perl\n\nBEGIN {\n");
+	printf("BEGIN {\n");
 }
 
 tick-1ms
diff --git a/test/unittest/funcs/tst.index.r b/test/unittest/funcs/tst.index.r
index 40f360fe..4eaa081c 100644
--- a/test/unittest/funcs/tst.index.r
+++ b/test/unittest/funcs/tst.index.r
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
 BEGIN {
 	if (index("foobarbaz", "barbaz") != 3) {
 		printf("perl => index(\"foobarbaz\", \"barbaz\") = %d\n",
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] test: expected results files should not be executable scripts
  2026-01-16 23:11 [PATCH] test: expected results files should not be executable scripts Kris Van Hees
@ 2026-01-17  2:06 ` Eugene Loh
  2026-01-17  2:54   ` Eugene Loh
  0 siblings, 1 reply; 3+ messages in thread
From: Eugene Loh @ 2026-01-17  2:06 UTC (permalink / raw)
  To: Kris Van Hees, dtrace

Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
Do tst.substr.d and tst.index.d need updated Copyright notices?

On 1/16/26 18:11, Kris Van Hees wrote:
> Tthese tests generated a bash or perl script as output, but given that
> the associated .r files are not meant ot be executable, do not emit a
> that looks like a script is not executable.
>
> Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
> ---
>   test/unittest/funcs/substr/tst.substr.d | 2 +-
>   test/unittest/funcs/substr/tst.substr.r | 2 --
>   test/unittest/funcs/tst.basename.d      | 4 +---
>   test/unittest/funcs/tst.basename.r      | 2 --
>   test/unittest/funcs/tst.index.d         | 2 +-
>   test/unittest/funcs/tst.index.r         | 2 --
>   6 files changed, 3 insertions(+), 11 deletions(-)
>
> diff --git a/test/unittest/funcs/substr/tst.substr.d b/test/unittest/funcs/substr/tst.substr.d
> index 8da15c30..4dcef73b 100644
> --- a/test/unittest/funcs/substr/tst.substr.d
> +++ b/test/unittest/funcs/substr/tst.substr.d
> @@ -153,7 +153,7 @@ BEGIN
>   
>   	end = i;
>   	i = 0;
> -	printf("#!/usr/bin/perl\n\nBEGIN {\n");
> +	printf("BEGIN {\n");
>   
>   }
>   
> diff --git a/test/unittest/funcs/substr/tst.substr.r b/test/unittest/funcs/substr/tst.substr.r
> index 94d94e74..285b5c19 100644
> --- a/test/unittest/funcs/substr/tst.substr.r
> +++ b/test/unittest/funcs/substr/tst.substr.r
> @@ -1,5 +1,3 @@
> -#!/usr/bin/perl
> -
>   BEGIN {
>   	if (substr("foobarbazbop", 3) ne "barbazbop") {
>   		printf("perl => substr(\"foobarbazbop\", 3) = \"%s\"\n",
> diff --git a/test/unittest/funcs/tst.basename.d b/test/unittest/funcs/tst.basename.d
> index 86d80873..2b3d098a 100644
> --- a/test/unittest/funcs/tst.basename.d
> +++ b/test/unittest/funcs/tst.basename.d
> @@ -1,6 +1,6 @@
>   /*
>    * Oracle Linux DTrace.
> - * Copyright (c) 2006, 2023, 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.
>    */
> @@ -38,8 +38,6 @@ BEGIN
>   
>   	end = i;
>   	i = 0;
> -
> -	printf("#!/bin/bash\n\n");
>   }
>   
>   syscall::ioctl:entry
> diff --git a/test/unittest/funcs/tst.basename.r b/test/unittest/funcs/tst.basename.r
> index 4f3aa0cc..fb68c543 100644
> --- a/test/unittest/funcs/tst.basename.r
> +++ b/test/unittest/funcs/tst.basename.r
> @@ -1,5 +1,3 @@
> -#!/bin/bash
> -
>   if [ `basename "/foo/bar/baz"` != "baz" ]; then
>   	echo "basename(\"/foo/bar/baz\") is \"baz\"; expected \"`basename "/foo/bar/baz"`"\"
>   fi
> diff --git a/test/unittest/funcs/tst.index.d b/test/unittest/funcs/tst.index.d
> index aab920eb..a918c386 100644
> --- a/test/unittest/funcs/tst.index.d
> +++ b/test/unittest/funcs/tst.index.d
> @@ -60,7 +60,7 @@ BEGIN
>   	i++;
>   
>   	end = j = k = 0;
> -	printf("#!/usr/bin/perl\n\nBEGIN {\n");
> +	printf("BEGIN {\n");
>   }
>   
>   tick-1ms
> diff --git a/test/unittest/funcs/tst.index.r b/test/unittest/funcs/tst.index.r
> index 40f360fe..4eaa081c 100644
> --- a/test/unittest/funcs/tst.index.r
> +++ b/test/unittest/funcs/tst.index.r
> @@ -1,5 +1,3 @@
> -#!/usr/bin/perl
> -
>   BEGIN {
>   	if (index("foobarbaz", "barbaz") != 3) {
>   		printf("perl => index(\"foobarbaz\", \"barbaz\") = %d\n",

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] test: expected results files should not be executable scripts
  2026-01-17  2:06 ` Eugene Loh
@ 2026-01-17  2:54   ` Eugene Loh
  0 siblings, 0 replies; 3+ messages in thread
From: Eugene Loh @ 2026-01-17  2:54 UTC (permalink / raw)
  To: Kris Van Hees, dtrace

I also meant to mention the typos in the commit msg:
"Tthese" -> "These"
"ot" -> "to"
"do not emit..." -> (something)

On 1/16/26 21:06, Eugene Loh wrote:
> Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
> Do tst.substr.d and tst.index.d need updated Copyright notices?
>
> On 1/16/26 18:11, Kris Van Hees wrote:
>> Tthese tests generated a bash or perl script as output, but given that
>> the associated .r files are not meant ot be executable, do not emit a
>> that looks like a script is not executable.
>>
>> Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
>> ---
>>   test/unittest/funcs/substr/tst.substr.d | 2 +-
>>   test/unittest/funcs/substr/tst.substr.r | 2 --
>>   test/unittest/funcs/tst.basename.d      | 4 +---
>>   test/unittest/funcs/tst.basename.r      | 2 --
>>   test/unittest/funcs/tst.index.d         | 2 +-
>>   test/unittest/funcs/tst.index.r         | 2 --
>>   6 files changed, 3 insertions(+), 11 deletions(-)
>>
>> diff --git a/test/unittest/funcs/substr/tst.substr.d 
>> b/test/unittest/funcs/substr/tst.substr.d
>> index 8da15c30..4dcef73b 100644
>> --- a/test/unittest/funcs/substr/tst.substr.d
>> +++ b/test/unittest/funcs/substr/tst.substr.d
>> @@ -153,7 +153,7 @@ BEGIN
>>         end = i;
>>       i = 0;
>> -    printf("#!/usr/bin/perl\n\nBEGIN {\n");
>> +    printf("BEGIN {\n");
>>     }
>>   diff --git a/test/unittest/funcs/substr/tst.substr.r 
>> b/test/unittest/funcs/substr/tst.substr.r
>> index 94d94e74..285b5c19 100644
>> --- a/test/unittest/funcs/substr/tst.substr.r
>> +++ b/test/unittest/funcs/substr/tst.substr.r
>> @@ -1,5 +1,3 @@
>> -#!/usr/bin/perl
>> -
>>   BEGIN {
>>       if (substr("foobarbazbop", 3) ne "barbazbop") {
>>           printf("perl => substr(\"foobarbazbop\", 3) = \"%s\"\n",
>> diff --git a/test/unittest/funcs/tst.basename.d 
>> b/test/unittest/funcs/tst.basename.d
>> index 86d80873..2b3d098a 100644
>> --- a/test/unittest/funcs/tst.basename.d
>> +++ b/test/unittest/funcs/tst.basename.d
>> @@ -1,6 +1,6 @@
>>   /*
>>    * Oracle Linux DTrace.
>> - * Copyright (c) 2006, 2023, 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.
>>    */
>> @@ -38,8 +38,6 @@ BEGIN
>>         end = i;
>>       i = 0;
>> -
>> -    printf("#!/bin/bash\n\n");
>>   }
>>     syscall::ioctl:entry
>> diff --git a/test/unittest/funcs/tst.basename.r 
>> b/test/unittest/funcs/tst.basename.r
>> index 4f3aa0cc..fb68c543 100644
>> --- a/test/unittest/funcs/tst.basename.r
>> +++ b/test/unittest/funcs/tst.basename.r
>> @@ -1,5 +1,3 @@
>> -#!/bin/bash
>> -
>>   if [ `basename "/foo/bar/baz"` != "baz" ]; then
>>       echo "basename(\"/foo/bar/baz\") is \"baz\"; expected 
>> \"`basename "/foo/bar/baz"`"\"
>>   fi
>> diff --git a/test/unittest/funcs/tst.index.d 
>> b/test/unittest/funcs/tst.index.d
>> index aab920eb..a918c386 100644
>> --- a/test/unittest/funcs/tst.index.d
>> +++ b/test/unittest/funcs/tst.index.d
>> @@ -60,7 +60,7 @@ BEGIN
>>       i++;
>>         end = j = k = 0;
>> -    printf("#!/usr/bin/perl\n\nBEGIN {\n");
>> +    printf("BEGIN {\n");
>>   }
>>     tick-1ms
>> diff --git a/test/unittest/funcs/tst.index.r 
>> b/test/unittest/funcs/tst.index.r
>> index 40f360fe..4eaa081c 100644
>> --- a/test/unittest/funcs/tst.index.r
>> +++ b/test/unittest/funcs/tst.index.r
>> @@ -1,5 +1,3 @@
>> -#!/usr/bin/perl
>> -
>>   BEGIN {
>>       if (index("foobarbaz", "barbaz") != 3) {
>>           printf("perl => index(\"foobarbaz\", \"barbaz\") = %d\n",

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-01-17  2:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-16 23:11 [PATCH] test: expected results files should not be executable scripts Kris Van Hees
2026-01-17  2:06 ` Eugene Loh
2026-01-17  2:54   ` Eugene Loh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox