RFR: 8219628: [TESTBUG] javadoc/doclet/InheritDocForUserTags fails with -othervm
Langer, Christoph
christoph.langer at sap.com
Thu Mar 14 21:15:07 UTC 2019
Looks good to me.
/Christoph
> -----Original Message-----
> From: javadoc-dev <javadoc-dev-bounces at openjdk.java.net> On Behalf Of
> Jonathan Gibbons
> Sent: Donnerstag, 14. März 2019 21:43
> To: Nick Gasson (Arm Technology China) <Nick.Gasson at arm.com>; javadoc-
> dev at openjdk.java.net
> Cc: Joe Darcy <Joe.Darcy at oracle.com>
> Subject: Re: RFR: 8219628: [TESTBUG] javadoc/doclet/InheritDocForUserTags
> fails with -othervm
>
> Ping to javadoc folk. I see I missed the link to the webrev in my
> previous message.
>
> http://cr.openjdk.java.net/~jjg/8219628/webrev.00/index.html
>
> I need someone to approve this one line, which is my addition to Nick's
> original patch,
>
> ---
> old/test/langtools/jdk/javadoc/doclet/InheritDocForUserTags/DocTest.java
> 2019-02-26 13:20:57.329865194 -0800
> +++
> new/test/langtools/jdk/javadoc/doclet/InheritDocForUserTags/DocTest.java
> 2019-02-26 13:20:56.981849931 -0800
> @@ -51,6 +51,7 @@
> public void test() {
> javadoc("-verbose",
> "-d", "DocTest",
> + "-sourcepath", System.getProperty("test.src.path"),
> "-tag", "apiNote:optcm:<em>API Note</em>",
> "-tag", "implSpec:optcm:<em>Implementation
> Requirements</em>:",
> "-tag", "implNote:optcm:<em>Implementation Note</em>:",
>
> -- Jon
>
>
> On 02/26/2019 01:28 PM, Jonathan Gibbons wrote:
> > Javadoc folk,
> >
> > Please review an updated webrev for this issue. This is Nick's change
> > (which I've reviewed) plus one additional line that I added so that
> > the test displays similar behavior in both agentvm and othervm jtreg
> > modes. I added the -sourcepath line in DocTest.java at line 54.
> >
> > When approved, I'll push it as a joint contribution.
> >
> > -- Jon
> >
> >
> >
> > On 02/25/2019 05:58 PM, Nick Gasson (Arm Technology China) wrote:
> >> Hi Jonathan,
> >>
> >> Sounds fine, thanks for looking into this.
> >>
> >> Nick
> >>
> >> On 26/02/2019 09:55, Jonathan Gibbons wrote:
> >>> Nick,
> >>>
> >>> Thanks for the report, and for the analysis you did. While good, your
> >>> proposed fix
> >>> is not complete, as it does not address the issues in agentvm mode.
> >>> Full
> >>> details
> >>> are in the comments in the JBS issue.
> >>>
> >>> I see you are a JDK Author, but not yet a Committer. I can get someone
> >>> else to
> >>> review my part of the patch and can then push this as a joint
> >>> contribution for you.
> >>>
> >>> -- Jon
> >>>
> >>>
> >>>
> >>> On 02/25/2019 02:09 AM, Nick Gasson (Arm Technology China) wrote:
> >>>> Hi,
> >>>>
> >>>> Please review this small patch to fix a failure of the above test when
> >>>> run with the jtreg -othervm option:
> >>>>
> >>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8219628
> >>>> Webrev: http://cr.openjdk.java.net/~ngasson/8219628/webrev.1/
> >>>>
> >>>> It passes with -agentvm but with -othervm it fails with this error:
> >>>>
> >>>>
> /home/nicgas01/jdk/test/langtools/jdk/javadoc/lib/javadoc/tester/JavadocT
> ester.java:99:
> >>>>
> >>>>
> >>>> error: unknown tag: Test
> >>>> * @Test
> >>>> ^
> >>>>
> >>>> The agentvm mode seems to be hiding a bug in the test:
> >>>> InheritDocForUserTags/DocTest.java has a class
> SimpleInheritDocDocTest
> >>>> extends DocTest which uses the javadoc @inheritDoc tag to inherit its
> >>>> documentation from DocTest. But the javadoc comment for DocTest is
> >>>> incorrectly placed before the import statement at the top of the file,
> >>>> rather than directly preceeding the class declaration. DocTest's
> >>>> parent
> >>>> class JavadocTester then has an error in its doc comment: it has an
> >>>> unescaped @ in "@Test" in a code sample, which javadoc interprets as
> a
> >>>> documentation tag and then errors out on.
> >>>>
> >>>> This patch escapes the @ and also moves the doc comment for DocTest
> to
> >>>> the correct place.
> >>>>
> >>>> The difference between the two jtreg modes seems to be in the value
> >>>> for
> >>>> the -sourcepath argument. In agentvm mode I see this line, where it
> >>>> loads the JavadocTester class file:
> >>>>
> >>>> [loading
> >>>> /home/nicgas01/jdk/build/linux-aarch64-server-fastdebug/test-
> support/jtreg_test_langtools_jdk_javadoc_doclet_InheritDocForUserTags_
> DocTest_java/classes/0/jdk/javadoc/lib/javadoc/tester/JavadocTester.class]
> >>>>
> >>>>
> >>>>
> >>>> And in othervm mode it loads and parses the source file:
> >>>>
> >>>> [loading
> >>>>
> /home/nicgas01/jdk/test/langtools/jdk/javadoc/lib/javadoc/tester/JavadocT
> ester.java]
> >>>>
> >>>>
> >>>>
> >>>> I've attached the two .jtr files to the JBS issue.
> >>>>
> >>>>
> >>>> Thanks,
> >>>> Nick
> >
More information about the javadoc-dev
mailing list