Re: [PATCH] test: expected results files should not be executable scripts
Eugene Loh <[email protected]> Fri, 16 Jan 2026 21:54:10 -0500
| Newsgroups | dev.linux.lists.dtrace |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> > 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 <[email protected]> >> --- >> 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",