From martinrb at google.com Wed Oct 15 20:04:46 2014 From: martinrb at google.com (Martin Buchholz) Date: Wed, 15 Oct 2014 13:04:46 -0700 Subject: Is there a recommended way of generating jtreg java test source? Message-ID: Occasionally, one would like to generate the java sources to be tested instead of checking them in (e.g. the generated source files may be huge). Is there a way to do that? Ideally, you would want to have some java code be @run to create the source files, and those could then in turn be @compile'd and @run'd, but that does not seem to be possible. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.gibbons at oracle.com Wed Oct 15 21:17:36 2014 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Wed, 15 Oct 2014 14:17:36 -0700 Subject: Is there a recommended way of generating jtreg java test source? In-Reply-To: References: Message-ID: <543EE470.1070406@oracle.com> On 10/15/2014 01:04 PM, Martin Buchholz wrote: > Occasionally, one would like to generate the java sources to be tested > instead of checking them in (e.g. the generated source files may be > huge). Is there a way to do that? > > Ideally, you would want to have some java code be @run to create the > source files, and those could then in turn be @compile'd and @run'd, > but that does not seem to be possible. Martin, We routinely do this in the OpenJDK langtools/test test suite, where we have a style of testing that generates hundreds, sometimes thousands of classes on the fly, to provide the test cases for a feature. You can generate the Java source code in memory, and then use the Java Compiler API to compile it (javax.tools.JacaCompiler) either to class files in memory or to class files on disk, depending on your ultimate usage. Note if you compile to memory, you can execute the classes using an appropriate ClassLoader. But, this all has to be done within a test class -- there is no inherent support in jtreg to @compile and @run generated stuff. You can look at the file langtools/test/tools/lib/ToolBox.java for a utility class to facilitate creating in memory source objects, compiling them, and so on. We wrote and used this class to replace many of the remaining shell tests in the langtools repo. -- Jon From martinrb at google.com Mon Oct 20 19:36:41 2014 From: martinrb at google.com (Martin Buchholz) Date: Mon, 20 Oct 2014 12:36:41 -0700 Subject: RFR: 7901066: jtreg should propagate LC_CTYPE, not LC_TYPE (a typo) Message-ID: Hi Jonathan, I'd like you to do a code review. # HG changeset patch # User martin # Date 1413833639 25200 # Mon Oct 20 12:33:59 2014 -0700 # Node ID a8beaa09e252997034815bee3dc13c837832b887 # Parent 5aa862e728dac6fa4b74d58e53fd80f6993a91b4 7901066: jtreg should propagate LC_CTYPE, not LC_TYPE (a typo) Summary: s/LC_TYPE/LC_CTYPE/g Reviewed-by: jjg diff --git a/src/share/classes/com/sun/javatest/regtest/Main.java b/src/share/classes/com/sun/javatest/regtest/Main.java --- a/src/share/classes/com/sun/javatest/regtest/Main.java +++ b/src/share/classes/com/sun/javatest/regtest/Main.java @@ -2380,7 +2380,7 @@ private static final String[] DEFAULT_UNIX_ENV_VARS = { "DISPLAY", "GNOME_DESKTOP_SESSION_ID", "HOME", "LANG", - "LC_ALL", "LC_TYPE", "LPDEST", "PRINTER", "TZ", "XMODIFIERS" + "LC_ALL", "LC_CTYPE", "LPDEST", "PRINTER", "TZ", "XMODIFIERS" }; private static final String[] DEFAULT_WINDOWS_ENV_VARS = { diff --git a/src/share/doc/javatest/regtest/faq.xml b/src/share/doc/javatest/regtest/faq.xml --- a/src/share/doc/javatest/regtest/faq.xml +++ b/src/share/doc/javatest/regtest/faq.xml @@ -1234,7 +1234,7 @@ HOME LANG, LC_ALL, - LC_TYPE, + LC_CTYPE, LPDEST, PRINTER, TZ and diff --git a/src/share/doc/javatest/regtest/tag-spec.html b/src/share/doc/javatest/regtest/tag-spec.html --- a/src/share/doc/javatest/regtest/tag-spec.html +++ b/src/share/doc/javatest/regtest/tag-spec.html @@ -582,7 +582,7 @@ HOME, LANG, LC_ALL, - LC_TYPE, + LC_CTYPE, LPDEST, PRINTER, TZ and -------------- next part -------------- An HTML attachment was scrubbed... URL: From martinrb at google.com Mon Oct 20 20:03:15 2014 From: martinrb at google.com (Martin Buchholz) Date: Mon, 20 Oct 2014 13:03:15 -0700 Subject: Is there a recommended way of generating jtreg java test source? In-Reply-To: <543EE470.1070406@oracle.com> References: <543EE470.1070406@oracle.com> Message-ID: So ... I looked at various testing tools in openjdk, and I think it would be good if there was easy-to-use support this kind of thing available from every jtreg test, but the design of such a general utility would be difficult. For my own use, I ended up using ToolProvider and JavaCompiler, and the result was not bad, but it would be a little better if just the right infrastructure was available. On Wed, Oct 15, 2014 at 2:17 PM, Jonathan Gibbons < jonathan.gibbons at oracle.com> wrote: > > On 10/15/2014 01:04 PM, Martin Buchholz wrote: > >> Occasionally, one would like to generate the java sources to be tested >> instead of checking them in (e.g. the generated source files may be huge). >> Is there a way to do that? >> >> Ideally, you would want to have some java code be @run to create the >> source files, and those could then in turn be @compile'd and @run'd, but >> that does not seem to be possible. >> > > Martin, > > We routinely do this in the OpenJDK langtools/test test suite, where we > have a style of testing that generates hundreds, sometimes thousands of > classes on the fly, to provide the test cases for a feature. > > You can generate the Java source code in memory, and then use the Java > Compiler API to compile it (javax.tools.JacaCompiler) either to class files > in memory or to class files on disk, depending on your ultimate usage. > Note if you compile to memory, you can execute the classes using an > appropriate ClassLoader. > > But, this all has to be done within a test class -- there is no inherent > support in jtreg to @compile and @run generated stuff. > > You can look at the file langtools/test/tools/lib/ToolBox.java for a > utility class to facilitate creating in memory source objects, compiling > them, and so on. We wrote and used this class to replace many of the > remaining shell tests in the langtools repo. > > -- Jon > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.gibbons at oracle.com Mon Oct 20 20:03:45 2014 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Mon, 20 Oct 2014 13:03:45 -0700 Subject: RFR: 7901066: jtreg should propagate LC_CTYPE, not LC_TYPE (a typo) In-Reply-To: References: Message-ID: <54456AA1.60700@oracle.com> Martin, For reference, I checked the following for a list of environment variables: http://pubs.opengroup.org/onlinepubs/007908799/xbd/envvar.html and I agree that I see LC_CTYPE and not LC_TYPE. Given that, I approve the review. Can I assume you would like me to push it for you? -- Jon On 10/20/2014 12:36 PM, Martin Buchholz wrote: > Hi Jonathan, > > I'd like you to do a code review. > > # HG changeset patch > # User martin > # Date 1413833639 25200 > # Mon Oct 20 12:33:59 2014 -0700 > # Node ID a8beaa09e252997034815bee3dc13c837832b887 > # Parent 5aa862e728dac6fa4b74d58e53fd80f6993a91b4 > 7901066: jtreg should propagate LC_CTYPE, not LC_TYPE (a typo) > Summary: s/LC_TYPE/LC_CTYPE/g > Reviewed-by: jjg > > diff --git a/src/share/classes/com/sun/javatest/regtest/Main.java > b/src/share/classes/com/sun/javatest/regtest/Main.java > --- a/src/share/classes/com/sun/javatest/regtest/Main.java > +++ b/src/share/classes/com/sun/javatest/regtest/Main.java > @@ -2380,7 +2380,7 @@ > private static final String[] DEFAULT_UNIX_ENV_VARS = { > "DISPLAY", "GNOME_DESKTOP_SESSION_ID", "HOME", "LANG", > - "LC_ALL", "LC_TYPE", "LPDEST", "PRINTER", "TZ", "XMODIFIERS" > + "LC_ALL", "LC_CTYPE", "LPDEST", "PRINTER", "TZ", "XMODIFIERS" > }; > private static final String[] DEFAULT_WINDOWS_ENV_VARS = { > diff --git a/src/share/doc/javatest/regtest/faq.xml > b/src/share/doc/javatest/regtest/faq.xml > --- a/src/share/doc/javatest/regtest/faq.xml > +++ b/src/share/doc/javatest/regtest/faq.xml > @@ -1234,7 +1234,7 @@ > HOME > LANG, > LC_ALL, > - LC_TYPE, > + LC_CTYPE, > LPDEST, > PRINTER, > TZ and > diff --git a/src/share/doc/javatest/regtest/tag-spec.html > b/src/share/doc/javatest/regtest/tag-spec.html > --- a/src/share/doc/javatest/regtest/tag-spec.html > +++ b/src/share/doc/javatest/regtest/tag-spec.html > @@ -582,7 +582,7 @@ > HOME, > LANG, > LC_ALL, > - LC_TYPE, > + LC_CTYPE, > LPDEST, > PRINTER, > TZ and > From jonathan.gibbons at oracle.com Mon Oct 20 20:12:27 2014 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Mon, 20 Oct 2014 13:12:27 -0700 Subject: Is there a recommended way of generating jtreg java test source? In-Reply-To: References: <543EE470.1070406@oracle.com> Message-ID: <54456CAB.2040504@oracle.com> In general, I think that designing something that works well in all OpenJDK repos is very difficult, which is why I generally advocate more customized libraries. I have also found it to be logistically difficult to design and provide something to satisfy everyone, with the added complication that when you update a sharedf test library, you risk affecting other tests with unforeseen consequences. For example, in the langtools world, we are interested in being able to work with the error messages from javac, and to exercise different invocation modes. In other repos, you're more likely to just be interested in just getting your source code compiled and getting an exception if there is a compilation error. ToolProvider and JavaCompiler are definitely the right building blocks to use. It also helps to have available a method to create a JavaFileObject from a string. ToolBox (that I referred to earlier) also has some smarts to derive a filename for a class by using regexes to find the package and class declarations. -- Jon On 10/20/2014 01:03 PM, Martin Buchholz wrote: > So ... I looked at various testing tools in openjdk, and I think it > would be good if there was easy-to-use support this kind of thing > available from every jtreg test, but the design of such a general > utility would be difficult. > > For my own use, I ended up using ToolProvider and JavaCompiler, and > the result was not bad, but it would be a little better if just the > right infrastructure was available. > > On Wed, Oct 15, 2014 at 2:17 PM, Jonathan Gibbons > > wrote: > > > On 10/15/2014 01:04 PM, Martin Buchholz wrote: > > Occasionally, one would like to generate the java sources to > be tested instead of checking them in (e.g. the generated > source files may be huge). Is there a way to do that? > > Ideally, you would want to have some java code be @run to > create the source files, and those could then in turn be > @compile'd and @run'd, but that does not seem to be possible. > > > Martin, > > We routinely do this in the OpenJDK langtools/test test suite, > where we have a style of testing that generates hundreds, > sometimes thousands of classes on the fly, to provide the test > cases for a feature. > > You can generate the Java source code in memory, and then use the > Java Compiler API to compile it (javax.tools.JacaCompiler) either > to class files in memory or to class files on disk, depending on > your ultimate usage. Note if you compile to memory, you can > execute the classes using an appropriate ClassLoader. > > But, this all has to be done within a test class -- there is no > inherent support in jtreg to @compile and @run generated stuff. > > You can look at the file langtools/test/tools/lib/ToolBox.java for > a utility class to facilitate creating in memory source objects, > compiling them, and so on. We wrote and used this class to > replace many of the remaining shell tests in the langtools repo. > > -- Jon > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From martinrb at google.com Mon Oct 20 20:18:19 2014 From: martinrb at google.com (Martin Buchholz) Date: Mon, 20 Oct 2014 13:18:19 -0700 Subject: RFR: 7901066: jtreg should propagate LC_CTYPE, not LC_TYPE (a typo) In-Reply-To: <54456AA1.60700@oracle.com> References: <54456AA1.60700@oracle.com> Message-ID: On Mon, Oct 20, 2014 at 1:03 PM, Jonathan Gibbons < jonathan.gibbons at oracle.com> wrote: > Martin, > > For reference, I checked the following for a list of environment variables: > http://pubs.opengroup.org/onlinepubs/007908799/xbd/envvar.html > > and I agree that I see LC_CTYPE and not LC_TYPE. > > Given that, I approve the review. Can I assume you would like me to push > it for you? > Yes, thanks. I wouldn't mind being a member of code-tools, but probably not worth the paperwork. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.gibbons at oracle.com Tue Oct 21 00:06:40 2014 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Mon, 20 Oct 2014 17:06:40 -0700 Subject: RFR: 7901066: jtreg should propagate LC_CTYPE, not LC_TYPE (a typo) In-Reply-To: References: <54456AA1.60700@oracle.com> Message-ID: <5445A390.9050201@oracle.com> On 10/20/2014 01:18 PM, Martin Buchholz wrote: > > > On Mon, Oct 20, 2014 at 1:03 PM, Jonathan Gibbons > > wrote: > > Martin, > > For reference, I checked the following for a list of environment > variables: > http://pubs.opengroup.org/onlinepubs/007908799/xbd/envvar.html > > and I agree that I see LC_CTYPE and not LC_TYPE. > > Given that, I approve the review. Can I assume you would like me > to push it for you? > > > Yes, thanks. > > I wouldn't mind being a member of code-tools, but probably not worth > the paperwork. If you mean that you would like push rights to the Code Tools, it's the standard process of "you need enough changesets first". -- Jon -------------- next part -------------- An HTML attachment was scrubbed... URL: From martinrb at google.com Tue Oct 28 01:37:48 2014 From: martinrb at google.com (Martin Buchholz) Date: Mon, 27 Oct 2014 18:37:48 -0700 Subject: Fwd: RFR: 7901073: jtreg makefiles should chmod a-w instead of chmod -w In-Reply-To: References: Message-ID: [oops + jtreg-use] ---------- Forwarded message ---------- From: Martin Buchholz Date: Mon, Oct 27, 2014 at 6:36 PM Subject: RFR: 7901073: jtreg makefiles should chmod a-w instead of chmod -w To: Jonathan Gibbons Hi Jonathan, I'd like you to do a code review. # HG changeset patch # User martin # Date 1414460013 25200 # Mon Oct 27 18:33:33 2014 -0700 # Node ID dbe3c2c342327350ca3f3f078614ef5882b32c98 # Parent 880984c8c5a0869dd991cdbd087d6fee57279dcf 7901073: jtreg makefiles should chmod a-w instead of chmod -w Summary: s/chmod -w/chmod a-w/g Reviewed-By: jjg diff --git a/make/Rules.gmk b/make/Rules.gmk --- a/make/Rules.gmk +++ b/make/Rules.gmk @@ -71,13 +71,13 @@ $(MKDIR) -p $(@D) $(RM) $@ $(CP) $(@:$(JTREG_IMAGEDOCDIR)/%=$(SRCDOCDIR)/%) $@ - chmod -w $@ + chmod a-w $@ $(JTREG_IMAGEDOCDIR)/%: $(SRCDOCDIR)/% $(MKDIR) -p $(@D) $(RM) $@ $(CP) $(@:$(JTREG_IMAGEDOCDIR)/%=$(SRCDOCDIR)/%) $@ - chmod -w $@ + chmod a-w $@ #--------------------------------------------------------------------- @@ -112,7 +112,7 @@ `sh pkgsToFiles.sh $(CLASSDIR) $($(@F:%.jar=PKGS.JAR.%))` \ $(patsubst $(CLASSDIR)/%,-C $(CLASSDIR) %,$(sort $(FILES.JAR.$(@F:%.jar=%)))) \ $(JAR_EXTRAS) - $(CHMOD) -w $@ + $(CHMOD) a-w $@ #---------------------------------------------------------------------- # diff --git a/make/jtdiff.gmk b/make/jtdiff.gmk --- a/make/jtdiff.gmk +++ b/make/jtdiff.gmk @@ -64,7 +64,7 @@ $(MKDIR) -p $(@D) $(RM) $@ $(CP) $< $@ - $(CHMOD) +x,-w $@ + $(CHMOD) a+x,a-w $@ TARGETS.ZIP.jtreg += \ $(JTREG_IMAGEDIR)/bin/jtdiff @@ -84,7 +84,7 @@ echo '#' ; \ ) > $(BUILDDIR)/jtdiff.warning.sed $(SED) -f $(BUILDDIR)/jtdiff.warning.sed $< > $@ - $(CHMOD) +x,-w $@ + $(CHMOD) a+x,a-w $@ TARGETS.ZIP.jtreg += \ $(JTREG_IMAGEDIR)/linux/bin/jtdiff \ diff --git a/make/jtreg.gmk b/make/jtreg.gmk --- a/make/jtreg.gmk +++ b/make/jtreg.gmk @@ -368,7 +368,7 @@ $(MKDIR) -p $(@D) $(RM) $@ $(CP) $< $@ - $(CHMOD) +x,-w $@ + $(CHMOD) a+x,a-w $@ TARGETS.ZIP.jtreg += \ $(JTREG_IMAGEDIR)/bin/jtreg @@ -388,7 +388,7 @@ echo '#' ; \ ) > $(BUILDDIR)/jtreg.warning.sed $(SED) -f $(BUILDDIR)/jtreg.warning.sed $< > $@ - $(CHMOD) +x,-w $@ + $(CHMOD) a+x,a-w $@ TARGETS.ZIP.jtreg += \ $(JTREG_IMAGEDIR)/linux/bin/jtreg \ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.gibbons at oracle.com Tue Oct 28 02:02:13 2014 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Mon, 27 Oct 2014 19:02:13 -0700 Subject: Fwd: RFR: 7901073: jtreg makefiles should chmod a-w instead of chmod -w In-Reply-To: References: Message-ID: <544EF925.20005@oracle.com> Hi Martin, Approved; I assume you'd like me to push for you, so will do. -- Jon On 10/27/2014 06:37 PM, Martin Buchholz wrote: > [oops + jtreg-use] > > ---------- Forwarded message ---------- > From: *Martin Buchholz* > > Date: Mon, Oct 27, 2014 at 6:36 PM > Subject: RFR: 7901073: jtreg makefiles should chmod a-w instead of > chmod -w > To: Jonathan Gibbons > > > > Hi Jonathan, > > I'd like you to do a code review. > > # HG changeset patch > # User martin > # Date 1414460013 25200 > # Mon Oct 27 18:33:33 2014 -0700 > # Node ID dbe3c2c342327350ca3f3f078614ef5882b32c98 > # Parent 880984c8c5a0869dd991cdbd087d6fee57279dcf > 7901073: jtreg makefiles should chmod a-w instead of chmod -w > Summary: s/chmod -w/chmod a-w/g > Reviewed-By: jjg > > diff --git a/make/Rules.gmk b/make/Rules.gmk > --- a/make/Rules.gmk > +++ b/make/Rules.gmk > @@ -71,13 +71,13 @@ > $(MKDIR) -p $(@D) > $(RM) $@ > $(CP) $(@:$(JTREG_IMAGEDOCDIR)/%=$(SRCDOCDIR)/%) $@ > -chmod -w $@ > +chmod a-w $@ > $(JTREG_IMAGEDOCDIR)/%: $(SRCDOCDIR)/% > $(MKDIR) -p $(@D) > $(RM) $@ > $(CP) $(@:$(JTREG_IMAGEDOCDIR)/%=$(SRCDOCDIR)/%) $@ > -chmod -w $@ > +chmod a-w $@ > #--------------------------------------------------------------------- > @@ -112,7 +112,7 @@ > `sh pkgsToFiles.sh $(CLASSDIR) $($(@F:%.jar=PKGS.JAR.%))` \ > $(patsubst $(CLASSDIR)/%,-C $(CLASSDIR) %,$(sort > $(FILES.JAR.$(@F:%.jar=%)))) \ > $(JAR_EXTRAS) > -$(CHMOD) -w $@ > +$(CHMOD) a-w $@ > #---------------------------------------------------------------------- > # > diff --git a/make/jtdiff.gmk b/make/jtdiff.gmk > --- a/make/jtdiff.gmk > +++ b/make/jtdiff.gmk > @@ -64,7 +64,7 @@ > $(MKDIR) -p $(@D) > $(RM) $@ > $(CP) $< $@ > -$(CHMOD) +x,-w $@ > +$(CHMOD) a+x,a-w $@ > TARGETS.ZIP.jtreg += \ > $(JTREG_IMAGEDIR)/bin/jtdiff > @@ -84,7 +84,7 @@ > echo '#' ; \ > ) > $(BUILDDIR)/jtdiff.warning.sed > $(SED) -f $(BUILDDIR)/jtdiff.warning.sed $< > $@ > -$(CHMOD) +x,-w $@ > +$(CHMOD) a+x,a-w $@ > TARGETS.ZIP.jtreg += \ > $(JTREG_IMAGEDIR)/linux/bin/jtdiff \ > diff --git a/make/jtreg.gmk b/make/jtreg.gmk > --- a/make/jtreg.gmk > +++ b/make/jtreg.gmk > @@ -368,7 +368,7 @@ > $(MKDIR) -p $(@D) > $(RM) $@ > $(CP) $< $@ > -$(CHMOD) +x,-w $@ > +$(CHMOD) a+x,a-w $@ > TARGETS.ZIP.jtreg += \ > $(JTREG_IMAGEDIR)/bin/jtreg > @@ -388,7 +388,7 @@ > echo '#' ; \ > ) > $(BUILDDIR)/jtreg.warning.sed > $(SED) -f $(BUILDDIR)/jtreg.warning.sed $< > $@ > -$(CHMOD) +x,-w $@ > +$(CHMOD) a+x,a-w $@ > TARGETS.ZIP.jtreg += \ > $(JTREG_IMAGEDIR)/linux/bin/jtreg \ > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From martinrb at google.com Tue Oct 28 02:03:32 2014 From: martinrb at google.com (Martin Buchholz) Date: Mon, 27 Oct 2014 19:03:32 -0700 Subject: Fwd: RFR: 7901073: jtreg makefiles should chmod a-w instead of chmod -w In-Reply-To: <544EF925.20005@oracle.com> References: <544EF925.20005@oracle.com> Message-ID: Thanks! On Mon, Oct 27, 2014 at 7:02 PM, Jonathan Gibbons < jonathan.gibbons at oracle.com> wrote: > Hi Martin, > > Approved; I assume you'd like me to push for you, so will do. > > -- Jon > > > On 10/27/2014 06:37 PM, Martin Buchholz wrote: > > [oops + jtreg-use] > > ---------- Forwarded message ---------- > From: Martin Buchholz > Date: Mon, Oct 27, 2014 at 6:36 PM > Subject: RFR: 7901073: jtreg makefiles should chmod a-w instead of chmod -w > To: Jonathan Gibbons > > > Hi Jonathan, > > I'd like you to do a code review. > > # HG changeset patch > # User martin > # Date 1414460013 25200 > # Mon Oct 27 18:33:33 2014 -0700 > # Node ID dbe3c2c342327350ca3f3f078614ef5882b32c98 > # Parent 880984c8c5a0869dd991cdbd087d6fee57279dcf > 7901073: jtreg makefiles should chmod a-w instead of chmod -w > Summary: s/chmod -w/chmod a-w/g > Reviewed-By: jjg > > diff --git a/make/Rules.gmk b/make/Rules.gmk > --- a/make/Rules.gmk > +++ b/make/Rules.gmk > @@ -71,13 +71,13 @@ > $(MKDIR) -p $(@D) > $(RM) $@ > $(CP) $(@:$(JTREG_IMAGEDOCDIR)/%=$(SRCDOCDIR)/%) $@ > - chmod -w $@ > + chmod a-w $@ > > $(JTREG_IMAGEDOCDIR)/%: $(SRCDOCDIR)/% > $(MKDIR) -p $(@D) > $(RM) $@ > $(CP) $(@:$(JTREG_IMAGEDOCDIR)/%=$(SRCDOCDIR)/%) $@ > - chmod -w $@ > + chmod a-w $@ > > #--------------------------------------------------------------------- > > @@ -112,7 +112,7 @@ > `sh pkgsToFiles.sh $(CLASSDIR) $($(@F:%.jar=PKGS.JAR.%))` \ > $(patsubst $(CLASSDIR)/%,-C $(CLASSDIR) %,$(sort > $(FILES.JAR.$(@F:%.jar=%)))) \ > $(JAR_EXTRAS) > - $(CHMOD) -w $@ > + $(CHMOD) a-w $@ > > #---------------------------------------------------------------------- > # > diff --git a/make/jtdiff.gmk b/make/jtdiff.gmk > --- a/make/jtdiff.gmk > +++ b/make/jtdiff.gmk > @@ -64,7 +64,7 @@ > $(MKDIR) -p $(@D) > $(RM) $@ > $(CP) $< $@ > - $(CHMOD) +x,-w $@ > + $(CHMOD) a+x,a-w $@ > > TARGETS.ZIP.jtreg += \ > $(JTREG_IMAGEDIR)/bin/jtdiff > @@ -84,7 +84,7 @@ > echo '#' ; \ > ) > $(BUILDDIR)/jtdiff.warning.sed > $(SED) -f $(BUILDDIR)/jtdiff.warning.sed $< > $@ > - $(CHMOD) +x,-w $@ > + $(CHMOD) a+x,a-w $@ > > TARGETS.ZIP.jtreg += \ > $(JTREG_IMAGEDIR)/linux/bin/jtdiff \ > diff --git a/make/jtreg.gmk b/make/jtreg.gmk > --- a/make/jtreg.gmk > +++ b/make/jtreg.gmk > @@ -368,7 +368,7 @@ > $(MKDIR) -p $(@D) > $(RM) $@ > $(CP) $< $@ > - $(CHMOD) +x,-w $@ > + $(CHMOD) a+x,a-w $@ > > TARGETS.ZIP.jtreg += \ > $(JTREG_IMAGEDIR)/bin/jtreg > @@ -388,7 +388,7 @@ > echo '#' ; \ > ) > $(BUILDDIR)/jtreg.warning.sed > $(SED) -f $(BUILDDIR)/jtreg.warning.sed $< > $@ > - $(CHMOD) +x,-w $@ > + $(CHMOD) a+x,a-w $@ > > TARGETS.ZIP.jtreg += \ > $(JTREG_IMAGEDIR)/linux/bin/jtreg \ > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.gibbons at oracle.com Tue Oct 28 20:49:02 2014 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Tue, 28 Oct 2014 13:49:02 -0700 Subject: Fwd: RFR: 7901073: jtreg makefiles should chmod a-w instead of chmod -w In-Reply-To: References: <544EF925.20005@oracle.com> Message-ID: <5450013E.7040800@oracle.com> Done, FWIW, the patch did not apply cleanly, with one minor rejection. I fixed it and pushed. -- Jon On 10/27/2014 07:03 PM, Martin Buchholz wrote: > Thanks! > > On Mon, Oct 27, 2014 at 7:02 PM, Jonathan Gibbons > > wrote: > > Hi Martin, > > Approved; I assume you'd like me to push for you, so will do. > > -- Jon > > > On 10/27/2014 06:37 PM, Martin Buchholz wrote: >> [oops + jtreg-use] >> >> ---------- Forwarded message ---------- >> From: *Martin Buchholz* > > >> Date: Mon, Oct 27, 2014 at 6:36 PM >> Subject: RFR: 7901073: jtreg makefiles should chmod a-w instead >> of chmod -w >> To: Jonathan Gibbons > > >> >> >> Hi Jonathan, >> >> I'd like you to do a code review. >> >> # HG changeset patch >> # User martin >> # Date 1414460013 25200 >> # Mon Oct 27 18:33:33 2014 -0700 >> # Node ID dbe3c2c342327350ca3f3f078614ef5882b32c98 >> # Parent 880984c8c5a0869dd991cdbd087d6fee57279dcf >> 7901073: jtreg makefiles should chmod a-w instead of chmod -w >> Summary: s/chmod -w/chmod a-w/g >> Reviewed-By: jjg >> >> diff --git a/make/Rules.gmk b/make/Rules.gmk >> --- a/make/Rules.gmk >> +++ b/make/Rules.gmk >> @@ -71,13 +71,13 @@ >> $(MKDIR) -p $(@D) >> $(RM) $@ >> $(CP) $(@:$(JTREG_IMAGEDOCDIR)/%=$(SRCDOCDIR)/%) $@ >> -chmod -w $@ >> +chmod a-w $@ >> $(JTREG_IMAGEDOCDIR)/%: $(SRCDOCDIR)/% >> $(MKDIR) -p $(@D) >> $(RM) $@ >> $(CP) $(@:$(JTREG_IMAGEDOCDIR)/%=$(SRCDOCDIR)/%) $@ >> -chmod -w $@ >> +chmod a-w $@ >> #--------------------------------------------------------------------- >> @@ -112,7 +112,7 @@ >> `sh pkgsToFiles.sh $(CLASSDIR) $($(@F:%.jar=PKGS.JAR.%))` \ >> $(patsubst $(CLASSDIR)/%,-C $(CLASSDIR) %,$(sort >> $(FILES.JAR.$(@F:%.jar=%)))) \ >> $(JAR_EXTRAS) >> -$(CHMOD) -w $@ >> +$(CHMOD) a-w $@ >> #---------------------------------------------------------------------- >> # >> diff --git a/make/jtdiff.gmk b/make/jtdiff.gmk >> --- a/make/jtdiff.gmk >> +++ b/make/jtdiff.gmk >> @@ -64,7 +64,7 @@ >> $(MKDIR) -p $(@D) >> $(RM) $@ >> $(CP) $< $@ >> -$(CHMOD) +x,-w $@ >> +$(CHMOD) a+x,a-w $@ >> TARGETS.ZIP.jtreg += \ >> $(JTREG_IMAGEDIR)/bin/jtdiff >> @@ -84,7 +84,7 @@ >> echo '#' ; \ >> ) > $(BUILDDIR)/jtdiff.warning.sed >> $(SED) -f $(BUILDDIR)/jtdiff.warning.sed $< > $@ >> -$(CHMOD) +x,-w $@ >> +$(CHMOD) a+x,a-w $@ >> TARGETS.ZIP.jtreg += \ >> $(JTREG_IMAGEDIR)/linux/bin/jtdiff \ >> diff --git a/make/jtreg.gmk b/make/jtreg.gmk >> --- a/make/jtreg.gmk >> +++ b/make/jtreg.gmk >> @@ -368,7 +368,7 @@ >> $(MKDIR) -p $(@D) >> $(RM) $@ >> $(CP) $< $@ >> -$(CHMOD) +x,-w $@ >> +$(CHMOD) a+x,a-w $@ >> TARGETS.ZIP.jtreg += \ >> $(JTREG_IMAGEDIR)/bin/jtreg >> @@ -388,7 +388,7 @@ >> echo '#' ; \ >> ) > $(BUILDDIR)/jtreg.warning.sed >> $(SED) -f $(BUILDDIR)/jtreg.warning.sed $< > $@ >> -$(CHMOD) +x,-w $@ >> +$(CHMOD) a+x,a-w $@ >> TARGETS.ZIP.jtreg += \ >> $(JTREG_IMAGEDIR)/linux/bin/jtreg \ >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: