From bryan at bceassociates.com Thu May 21 15:12:28 2015 From: bryan at bceassociates.com (Bryan C. Everly) Date: Thu, 21 May 2015 11:12:28 -0400 Subject: OpenBSD Message-ID: Hello, I was able to get jtreg to build on OpenBSD 5.7 with a couple of small diffs (see below). In working with the folks on the OpenJDK BSD Port project, they suggested I reach out to this list to see if someone would be willing to commit these on my behalf? I have signed an OCA and am assisting on the OpenJDK BSD Port project so there shouldn't be any problems from that perspective. I'd be happy to test the code after the changes are committed to make sure that everything is working ok. Some notes: While the Platform.gmk looks like it isn't used, it keeps us from falling into code that assumes this is Cygwin on Windows (which messes all sorts of things up). I figured why not create those variables for later use that identify our platform. The diffs: diff -r afdc0ea0286a make/Defs.gmk --- a/make/Defs.gmk Mon May 18 18:34:08 2015 -0700 +++ b/make/Defs.gmk Wed May 20 12:51:22 2015 -0400 @@ -261,8 +261,9 @@ TEST = /usr/bin/test TOUCH = /usr/bin/touch UNZIP = /usr/bin/unzip +UNZIP := *shell if [ -r /usr/bin/unzip ]; then echo /usr/bin/unzip ; else echo /usr/local/bin/unzip ; fi ) WC = /usr/bin/wc -ZIP = /usr/bin/zip +ZIP := $(shell if [ -r /usr/bin/zip ]; then echo /usr/bin/zip ; else echo /usr/local/bin/zip ; fi ) #---------------------------------------------------------------------- diff -r afdc0ea0286a make/Platform.gmk --- a/make/Platform.gmk Mon May 18 18:34:08 2015 -0700 +++ b/make/Platform.gmk Wed May 20 12:51:22 2015 -0400 @@ -47,6 +47,11 @@ OS_ARCH := $(shell $(UNAME) -p) OS_VERSION := $(shell $(UNAME) -r) endif +ifeq ($(UNAME_S), OpenBSD) + OS_NAME = openbsd + OS_ARCH := $(shell $(UNAME) -p) + OS_VERSION := $(shell $(UNAME) -r) +endif ifeq ($(UNAME_S), Linux) OS_NAME = linux OS_ARCH := $(shell $(UNAME) -m) Thanks, Bryan From jonathan.gibbons at oracle.com Thu May 21 23:06:38 2015 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Thu, 21 May 2015 16:06:38 -0700 Subject: OpenBSD In-Reply-To: References: Message-ID: <555E64FE.5040406@oracle.com> Bryan, jtreg-dev at openjdk would be a slightly better alias for this, but this one works too. I can take a look at this next week, but in the meantime, I would ask why the different form of the lines for the changes to the UNZIP and ZIP settings. Meaning "*shell" vs "$(shell". -- Jon On 05/21/2015 08:12 AM, Bryan C. Everly wrote: > Hello, > > I was able to get jtreg to build on OpenBSD 5.7 with a couple of small > diffs (see below). In working with the folks on the OpenJDK BSD Port > project, they suggested I reach out to this list to see if someone > would be willing to commit these on my behalf? I have signed an OCA > and am assisting on the OpenJDK BSD Port project so there shouldn't be > any problems from that perspective. I'd be happy to test the code > after the changes are committed to make sure that everything is > working ok. > > Some notes: > > While the Platform.gmk looks like it isn't used, it keeps us from > falling into code that assumes this is Cygwin on Windows (which messes > all sorts of things up). I figured why not create those variables for > later use that identify our platform. > > The diffs: > > diff -r afdc0ea0286a make/Defs.gmk > --- a/make/Defs.gmk Mon May 18 18:34:08 2015 -0700 > +++ b/make/Defs.gmk Wed May 20 12:51:22 2015 -0400 > @@ -261,8 +261,9 @@ > TEST = /usr/bin/test > TOUCH = /usr/bin/touch > UNZIP = /usr/bin/unzip > +UNZIP := *shell if [ -r /usr/bin/unzip ]; then echo /usr/bin/unzip > ; else echo /usr/local/bin/unzip ; fi ) > WC = /usr/bin/wc > -ZIP = /usr/bin/zip > +ZIP := $(shell if [ -r /usr/bin/zip ]; then echo /usr/bin/zip ; > else echo /usr/local/bin/zip ; fi ) > > > #---------------------------------------------------------------------- > diff -r afdc0ea0286a make/Platform.gmk > --- a/make/Platform.gmk Mon May 18 18:34:08 2015 -0700 > +++ b/make/Platform.gmk Wed May 20 12:51:22 2015 -0400 > @@ -47,6 +47,11 @@ > OS_ARCH := $(shell $(UNAME) -p) > OS_VERSION := $(shell $(UNAME) -r) > endif > +ifeq ($(UNAME_S), OpenBSD) > + OS_NAME = openbsd > + OS_ARCH := $(shell $(UNAME) -p) > + OS_VERSION := $(shell $(UNAME) -r) > +endif > ifeq ($(UNAME_S), Linux) > OS_NAME = linux > OS_ARCH := $(shell $(UNAME) -m) > > Thanks, > Bryan From bryan at bceassociates.com Fri May 22 00:05:11 2015 From: bryan at bceassociates.com (Bryan Everly) Date: Thu, 21 May 2015 20:05:11 -0400 Subject: OpenBSD In-Reply-To: <555E64FE.5040406@oracle.com> References: <555E64FE.5040406@oracle.com> Message-ID: <6103710193776625371@unknownmsgid> Thanks for the catch. That would be a typo. Should both read $(shell Thanks, Bryan > On May 21, 2015, at 7:06 PM, Jonathan Gibbons wrote: > > Bryan, > > jtreg-dev at openjdk would be a slightly better alias for this, but this one works too. > > I can take a look at this next week, but in the meantime, I would ask > why the different form of the lines for the changes to the UNZIP and > ZIP settings. Meaning "*shell" vs "$(shell". > > -- Jon > > >> On 05/21/2015 08:12 AM, Bryan C. Everly wrote: >> Hello, >> >> I was able to get jtreg to build on OpenBSD 5.7 with a couple of small >> diffs (see below). In working with the folks on the OpenJDK BSD Port >> project, they suggested I reach out to this list to see if someone >> would be willing to commit these on my behalf? I have signed an OCA >> and am assisting on the OpenJDK BSD Port project so there shouldn't be >> any problems from that perspective. I'd be happy to test the code >> after the changes are committed to make sure that everything is >> working ok. >> >> Some notes: >> >> While the Platform.gmk looks like it isn't used, it keeps us from >> falling into code that assumes this is Cygwin on Windows (which messes >> all sorts of things up). I figured why not create those variables for >> later use that identify our platform. >> >> The diffs: >> >> diff -r afdc0ea0286a make/Defs.gmk >> --- a/make/Defs.gmk Mon May 18 18:34:08 2015 -0700 >> +++ b/make/Defs.gmk Wed May 20 12:51:22 2015 -0400 >> @@ -261,8 +261,9 @@ >> TEST = /usr/bin/test >> TOUCH = /usr/bin/touch >> UNZIP = /usr/bin/unzip >> +UNZIP := *shell if [ -r /usr/bin/unzip ]; then echo /usr/bin/unzip >> ; else echo /usr/local/bin/unzip ; fi ) >> WC = /usr/bin/wc >> -ZIP = /usr/bin/zip >> +ZIP := $(shell if [ -r /usr/bin/zip ]; then echo /usr/bin/zip ; >> else echo /usr/local/bin/zip ; fi ) >> >> >> #---------------------------------------------------------------------- >> diff -r afdc0ea0286a make/Platform.gmk >> --- a/make/Platform.gmk Mon May 18 18:34:08 2015 -0700 >> +++ b/make/Platform.gmk Wed May 20 12:51:22 2015 -0400 >> @@ -47,6 +47,11 @@ >> OS_ARCH := $(shell $(UNAME) -p) >> OS_VERSION := $(shell $(UNAME) -r) >> endif >> +ifeq ($(UNAME_S), OpenBSD) >> + OS_NAME = openbsd >> + OS_ARCH := $(shell $(UNAME) -p) >> + OS_VERSION := $(shell $(UNAME) -r) >> +endif >> ifeq ($(UNAME_S), Linux) >> OS_NAME = linux >> OS_ARCH := $(shell $(UNAME) -m) >> >> Thanks, >> Bryan > From bryan at bceassociates.com Fri May 22 00:57:52 2015 From: bryan at bceassociates.com (Bryan C. Everly) Date: Thu, 21 May 2015 20:57:52 -0400 Subject: OpenBSD In-Reply-To: <6103710193776625371@unknownmsgid> References: <555E64FE.5040406@oracle.com> <6103710193776625371@unknownmsgid> Message-ID: Updated diff below (sorry for the typos): --- a/make/Defs.gmk Mon May 18 18:34:08 2015 -0700 +++ b/make/Defs.gmk Thu May 21 20:56:55 2015 -0400 @@ -260,9 +260,9 @@ SORT = /usr/bin/sort TEST = /usr/bin/test TOUCH = /usr/bin/touch -UNZIP = /usr/bin/unzip +UNZIP := $(shell if [ -r /usr/bin/unzip ]; then echo /usr/bin/unzip ; else echo /usr/local/bin/unzip ; fi ) WC = /usr/bin/wc -ZIP = /usr/bin/zip +ZIP := $(shell if [ -r /usr/bin/zip ]; then echo /usr/bin/zip ; else echo /usr/local/bin/zip ; fi ) #---------------------------------------------------------------------- diff -r afdc0ea0286a make/Platform.gmk --- a/make/Platform.gmk Mon May 18 18:34:08 2015 -0700 +++ b/make/Platform.gmk Thu May 21 20:56:55 2015 -0400 @@ -47,6 +47,11 @@ OS_ARCH := $(shell $(UNAME) -p) OS_VERSION := $(shell $(UNAME) -r) endif +ifeq ($(UNAME_S), OpenBSD) + OS_NAME = openbsd + OS_ARCH := $(shell $(UNAME) -p) + OS_VERSION := $(shell $(UNAME) -r) +endif ifeq ($(UNAME_S), Linux) OS_NAME = linux OS_ARCH := $(shell $(UNAME) -m) Thanks, Bryan On Thu, May 21, 2015 at 8:05 PM, Bryan Everly wrote: > Thanks for the catch. That would be a typo. Should both read $(shell > > Thanks, > Bryan > >> On May 21, 2015, at 7:06 PM, Jonathan Gibbons wrote: >> >> Bryan, >> >> jtreg-dev at openjdk would be a slightly better alias for this, but this one works too. >> >> I can take a look at this next week, but in the meantime, I would ask >> why the different form of the lines for the changes to the UNZIP and >> ZIP settings. Meaning "*shell" vs "$(shell". >> >> -- Jon >> >> >>> On 05/21/2015 08:12 AM, Bryan C. Everly wrote: >>> Hello, >>> >>> I was able to get jtreg to build on OpenBSD 5.7 with a couple of small >>> diffs (see below). In working with the folks on the OpenJDK BSD Port >>> project, they suggested I reach out to this list to see if someone >>> would be willing to commit these on my behalf? I have signed an OCA >>> and am assisting on the OpenJDK BSD Port project so there shouldn't be >>> any problems from that perspective. I'd be happy to test the code >>> after the changes are committed to make sure that everything is >>> working ok. >>> >>> Some notes: >>> >>> While the Platform.gmk looks like it isn't used, it keeps us from >>> falling into code that assumes this is Cygwin on Windows (which messes >>> all sorts of things up). I figured why not create those variables for >>> later use that identify our platform. >>> >>> The diffs: >>> >>> diff -r afdc0ea0286a make/Defs.gmk >>> --- a/make/Defs.gmk Mon May 18 18:34:08 2015 -0700 >>> +++ b/make/Defs.gmk Wed May 20 12:51:22 2015 -0400 >>> @@ -261,8 +261,9 @@ >>> TEST = /usr/bin/test >>> TOUCH = /usr/bin/touch >>> UNZIP = /usr/bin/unzip >>> +UNZIP := *shell if [ -r /usr/bin/unzip ]; then echo /usr/bin/unzip >>> ; else echo /usr/local/bin/unzip ; fi ) >>> WC = /usr/bin/wc >>> -ZIP = /usr/bin/zip >>> +ZIP := $(shell if [ -r /usr/bin/zip ]; then echo /usr/bin/zip ; >>> else echo /usr/local/bin/zip ; fi ) >>> >>> >>> #---------------------------------------------------------------------- >>> diff -r afdc0ea0286a make/Platform.gmk >>> --- a/make/Platform.gmk Mon May 18 18:34:08 2015 -0700 >>> +++ b/make/Platform.gmk Wed May 20 12:51:22 2015 -0400 >>> @@ -47,6 +47,11 @@ >>> OS_ARCH := $(shell $(UNAME) -p) >>> OS_VERSION := $(shell $(UNAME) -r) >>> endif >>> +ifeq ($(UNAME_S), OpenBSD) >>> + OS_NAME = openbsd >>> + OS_ARCH := $(shell $(UNAME) -p) >>> + OS_VERSION := $(shell $(UNAME) -r) >>> +endif >>> ifeq ($(UNAME_S), Linux) >>> OS_NAME = linux >>> OS_ARCH := $(shell $(UNAME) -m) >>> >>> Thanks, >>> Bryan >> From tomasz.kowalczewski at gmail.com Tue May 26 09:04:18 2015 From: tomasz.kowalczewski at gmail.com (Tomasz Kowalczewski) Date: Tue, 26 May 2015 11:04:18 +0200 Subject: Placing tests in java.lang package (for testing protected methods) Message-ID: Hi, I am trying to test a protected method of java.lang.String. Is this possible with jtreg? If I specify: * @run testng java.lang.StringIndexOfCharSequenceTest */ package java.lang; I will (unsurprisingly) get "SecurityException: Prohibited package name: java.lang". I was thinking that there may be some jtreg magic to circumvent this? -- Thanks, Tomasz Kowalczewski -------------- next part -------------- An HTML attachment was scrubbed... URL: From Alan.Bateman at oracle.com Tue May 26 09:27:23 2015 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Tue, 26 May 2015 10:27:23 +0100 Subject: Placing tests in java.lang package (for testing protected methods) In-Reply-To: References: Message-ID: <55643C7B.7050705@oracle.com> On 26/05/2015 10:04, Tomasz Kowalczewski wrote: > Hi, > > I am trying to test a protected method of java.lang.String. Is this > possible with jtreg? If I specify: > > * @run testng java.lang.StringIndexOfCharSequenceTest > */ > package java.lang; > > I will (unsurprisingly) get "SecurityException: Prohibited package > name: java.lang". I was thinking that there may be some jtreg magic to > circumvent this? > Protected or package private? I assume the latter, in which case the test class will need to be in java.lang with the boot loader as the defining loader. Outside of the test harness then you could do this with -Xbootclasspath/a. As a jtreg test then the magic property to add to TEST.properties is bootclasspath.dirs to specify the directory with the classes to be loaded by the boot loader. Jon or others might have more to say on this but I think this feature is somewhat limited to TestNG tests, I don't think I've seen it used for anything other than TestNG tests. You'll see examples in the jdk repo, specifically in jdk/test/java/util/stream. -Alan From tomasz.kowalczewski at gmail.com Wed May 27 12:35:40 2015 From: tomasz.kowalczewski at gmail.com (Tomasz Kowalczewski) Date: Wed, 27 May 2015 14:35:40 +0200 Subject: Placing tests in java.lang package (for testing protected methods) In-Reply-To: <55643C7B.7050705@oracle.com> References: <55643C7B.7050705@oracle.com> Message-ID: Thank you, that was exactly what I needed for jtreg. -- Regards, Tomasz On Tue, May 26, 2015 at 11:27 AM, Alan Bateman wrote: > > > On 26/05/2015 10:04, Tomasz Kowalczewski wrote: > >> Hi, >> >> I am trying to test a protected method of java.lang.String. Is this >> possible with jtreg? If I specify: >> >> * @run testng java.lang.StringIndexOfCharSequenceTest >> */ >> package java.lang; >> >> I will (unsurprisingly) get "SecurityException: Prohibited package name: >> java.lang". I was thinking that there may be some jtreg magic to circumvent >> this? >> >> Protected or package private? I assume the latter, in which case the > test class will need to be in java.lang with the boot loader as the > defining loader. Outside of the test harness then you could do this with > -Xbootclasspath/a. > > As a jtreg test then the magic property to add to TEST.properties is > bootclasspath.dirs to specify the directory with the classes to be loaded > by the boot loader. Jon or others might have more to say on this but I > think this feature is somewhat limited to TestNG tests, I don't think I've > seen it used for anything other than TestNG tests. You'll see examples in > the jdk repo, specifically in jdk/test/java/util/stream. > > -Alan > -- Tomasz Kowalczewski -------------- next part -------------- An HTML attachment was scrubbed... URL: