From martijnverburg at gmail.com Sun Feb 1 10:44:38 2015 From: martijnverburg at gmail.com (Martijn Verburg) Date: Sun, 1 Feb 2015 11:44:38 +0100 Subject: Code coverage statistics for OpenJDK Message-ID: Hi all, Recently, one of our Adopt OpenJDK incubator projects (for reference, these projects are outside of OpenJDK proper, the wiki holds the full list) managed to get some what we think are accurate code coverage stats for OpenJDK (jdk9-dev) tests. Thanks to Jonathan Gibbons from code-tools (jtreg/jcov) and Adopt's John Oliver for getting this out! I think this is potentially useful for the OpenJDK quality group to report alongside the existing weekly tests passing that Balchandra kindly pushes out. It can also be useful to OpenJDK contributors to have a guide on making a change -> writing a test -> seeing code coverage improve. Obviously we want to: * Make sure the numbers are correct. * Make it clear in the report that this does not represent how well OpenJDK / Java is actually tested (internally Oracle and others run a far more comprehensive test suite). Do people feel this is this a good idea? If so, who's the right person/people to analyse our results and ensure we're using jtreg and jcov correctly? Cheers, Martijn From volker.simonis at gmail.com Fri Feb 13 11:01:15 2015 From: volker.simonis at gmail.com (Volker Simonis) Date: Fri, 13 Feb 2015 12:01:15 +0100 Subject: RFR(XS): 7901298: jcheck should check that every file ends with exactly one newline Message-ID: Hi, could somebody please review and sponsor the following small change which adds a test for exactly one newline at the and of a file to check: http://cr.openjdk.java.net/~simonis/webrevs/2015/7901298/ https://bugs.openjdk.java.net/browse/CODETOOLS-7901298 Thank you and best regards, Volker From volker.simonis at gmail.com Fri Feb 13 18:01:19 2015 From: volker.simonis at gmail.com (Volker Simonis) Date: Fri, 13 Feb 2015 19:01:19 +0100 Subject: RFR(S): 7901304: IDPREFIX should be configurable from the environment much like BUGURL already is Message-ID: Hi, could somebody please review and sponsor the following small change: http://cr.openjdk.java.net/~simonis/webrevs/2015/7901304/ https://bugs.openjdk.java.net/browse/CODETOOLS-7901304 It is possible to configure the bug url for links to the corresponding OpenJDK bugs by setting the environment variable WEBREV_BUGURL. Unfortunately it is not possible to configure the IDPREFIX which is hard-wired to "JDK-". This makes it impossible to create links to the bug systems for projects like CODETOOLS. The fix is easy - just read IDPREFIX from the environment if there exists an environment variable called WEBREV_IDPREFIX (by the way, the result can be seen in the webrev which correctly links to the corresponding codetools bug :). I've also slightly reordered the place where WEBREV_BUGURL and WEBREV_IDPREFIX are initialized to make it possible to print their default values in the webrev usage text. Regards, Volker From erik.joelsson at oracle.com Mon Feb 23 14:10:44 2015 From: erik.joelsson at oracle.com (Erik Joelsson) Date: Mon, 23 Feb 2015 15:10:44 +0100 Subject: Fwd: Re: RFR(xxs): 8072935: Fix missing newline at end of file after 8067447 In-Reply-To: References: <54DC944C.40701@oracle.com> <54DC9580.9010106@oracle.com> <54DCA13D.7060706@oracle.com> <54DDCD3F.4060406@oracle.com> <54DDD38B.9070003@oracle.com> <54DDE0CC.7050308@oracle.com> <54E1BFFA.3040107@oracle.com> Message-ID: <54EB34E4.9020605@oracle.com> (replying to fix CC to actual code-tools-dev mailing list) /Erik On 2015-02-16 11:55, Volker Simonis wrote: > On Mon, Feb 16, 2015 at 11:01 AM, Erik Joelsson > wrote: >> On 2015-02-13 18:18, Volker Simonis wrote: >>> On Fri, Feb 13, 2015 at 12:32 PM, Erik Joelsson >>> wrote: >>>> I would suggest that. I'm not sure if all the checks apply to .properties >>>> files, but certainly the line ending at end of file needs care when >>>> processing .properties files with sed on certain platforms. Tabs obviously >>>> need to be allowed in Makefiles, but other than that I see no reason for >>>> exceptions. Is there a way to run jcheck on existing code to see if any >>>> fixes are needed? >>> Not sure, but I don't think so. You can give jcheck a range of >>> revisions to test (e.g. hg jcheck -r 1:5) but that's not what we >>> actually want. >>> >>> I think having such an extension to jcheck would be useful (especially >>> for the folks who develop new jcheck filters) but probably another >>> change. >> Certainly another change. >>> I also noticed (by running Martins script) that we have a lot of files >>> with more than one newline at the end of file (in the hotspot forest >>> it's three in ./agent, 133 in ./test and 77 in ./src). So we should >>> either relax the requirement of having "exactly one newline at the >>> eof" into "having at least one newline at the eof" or we have to first >>> fix the corresponding files in one big change. >>> >>> What do you think? Probably we'll have to move this discussion back to >>> corresponding group lists because they will actually have to decide >>> this :) >> If we enforce no trailing whitespace, then enforcing exactly one newline >> doesn't seem unreasonable to me. Cleaning up the code to actually conform to >> a new standard will need to be brought to each group with offending code. >> > OK. Should I create a RFE and bring this up on the HotSpot list? > >> /Erik >> >> >>>> /Erik >>>> >>>> >>>>> Regards, >>>>> Volker >>>>> >>>>> >>>>> On Fri, Feb 13, 2015 at 11:35 AM, Erik Joelsson >>>>> wrote: >>>>>> If we are to create such a check, please also include .gmk, >>>>>> .properties, >>>>>> .m4 >>>>>> and Makefile. In JDK-8072950 I'm adding a workaround for missing line >>>>>> endings in properties files. >>>>>> >>>>>> /Erik >>>>>> >>>>>> >>>>>> On 2015-02-13 11:09, David Holmes wrote: >>>>>>> On 13/02/2015 7:23 PM, Volker Simonis wrote: >>>>>>>> Hi, >>>>>>>> >>>>>>>> could somebody please sponsor and push this change. >>>>>>> >>>>>>> Push it to where, as what? I thought you wanted a jcheck addition. >>>>>>> >>>>>>> David >>>>>>> >>>>>>>> Thanks, >>>>>>>> Volker >>>>>>>> >>>>>>>> >>>>>>>> On Fri, Feb 13, 2015 at 7:49 AM, Martin Buchholz >>>>>>>> >>>>>>>> wrote: >>>>>>>>> Source files should have exactly one trailing newline. >>>>>>>>> >>>>>>>>> find -iregex '.*\.\(java\|txt\|c\|cc\|h\|hpp\|cpp\)$' | xargs perl >>>>>>>>> -0777 >>>>>>>>> -ne >>>>>>>>> 'print "Must have exactly one trailing newline: $ARGV\n" unless >>>>>>>>> m~[^\n]\Z~s' >>>>>>>>> >>>>>>>>>