Skip to content

JDK-8290126: Add a check in JavadocTester for "javadoc should not crash" #9458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

jonathan-gibbons
Copy link
Contributor

@jonathan-gibbons jonathan-gibbons commented Jul 12, 2022

Please review a simple update to JavadocTester to provide a default-on check that no stack traces were written to the STDERR stream.

There are also some minor cleanup edits suggested by the IDE.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8290126: Add a check in JavadocTester for "javadoc should not crash"

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9458/head:pull/9458
$ git checkout pull/9458

Update a local copy of the PR:
$ git checkout pull/9458
$ git pull https://git.openjdk.org/jdk pull/9458/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 9458

View PR using the GUI difftool:
$ git pr show -t 9458

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9458.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 12, 2022

👋 Welcome back jjg! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 12, 2022
@openjdk
Copy link

openjdk bot commented Jul 12, 2022

@jonathan-gibbons The following label will be automatically applied to this pull request:

  • javadoc

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the javadoc javadoc-dev@openjdk.org label Jul 12, 2022
@mlbridge
Copy link

mlbridge bot commented Jul 12, 2022

Copy link
Member

@pavelrappo pavelrappo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR could use the feature it introduces. It would test drive the feature and ensure that the feature works. A brief search showed these potential candidates in test/langtools/jdk/javadoc/:

  1. doclet/InheritDocForUserTags/DocTest.java:57
  2. tool/BadOptionsTest.java:83,96,108,120,132
  3. doclet/testCustomTagletRegistration/TestRegistrationErrors.java:76
  4. doclet/testSnippetTag/SnippetTester.java:55

@jonathan-gibbons
Copy link
Contributor Author

This PR could use the feature it introduces. It would test drive the feature and ensure that the feature works. A brief search showed these potential candidates in test/langtools/jdk/javadoc/:

  1. doclet/InheritDocForUserTags/DocTest.java:57
  2. tool/BadOptionsTest.java:83,96,108,120,132
  3. doclet/testCustomTagletRegistration/TestRegistrationErrors.java:76
  4. doclet/testSnippetTag/SnippetTester.java:55

Like other similar features, the feature is "default on", so it is currently active for all tests.

@pavelrappo
Copy link
Member

This PR could use the feature it introduces. It would test drive the feature and ensure that the feature works. A brief search showed these potential candidates in test/langtools/jdk/javadoc/:

  1. doclet/InheritDocForUserTags/DocTest.java:57
  2. tool/BadOptionsTest.java:83,96,108,120,132
  3. doclet/testCustomTagletRegistration/TestRegistrationErrors.java:76
  4. doclet/testSnippetTag/SnippetTester.java:55

Like other similar features, the feature is "default on", so it is currently active for all tests.

Then I assume you'll see test failures if you change at com.sun. and don't update the tests that expect exceptions.

@jonathan-gibbons
Copy link
Contributor Author

jonathan-gibbons commented Aug 16, 2022

This PR could use the feature it introduces. It would test drive the feature and ensure that the feature works. A brief search showed these potential candidates in test/langtools/jdk/javadoc/:

  1. doclet/InheritDocForUserTags/DocTest.java:57
  2. tool/BadOptionsTest.java:83,96,108,120,132
  3. doclet/testCustomTagletRegistration/TestRegistrationErrors.java:76
  4. doclet/testSnippetTag/SnippetTester.java:55

Like other similar features, the feature is "default on", so it is currently active for all tests.

Then I assume you'll see test failures if you change at com.sun. and don't update the tests that expect exceptions.

I removed the now almost useless check for at com.sun in DocTest.java ... it was still minimally functional because of jtreg on the stack.

I left in all the other existing checks for no stack traces or exception because they do not exactly match the new check.

There are very few tests that actually check for exceptions: TestTFMBuilder.java is it, and that uses the new ability to disable the check for stack traces. See TestTFMBuilder.java line 164 in this PR.

If it needs to be said, all javadoc tests pass with these changes.

Copy link
Member

@pavelrappo pavelrappo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great if you could update the copyright year in TestTFMBuilder.java.

@openjdk
Copy link

openjdk bot commented Sep 1, 2022

@jonathan-gibbons This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8290126: Add a check in JavadocTester for "javadoc should not crash"

Reviewed-by: prappo

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 11 new commits pushed to the master branch:

  • 0a4d0ce: 8293121: (fs) Refactor UnixFileSystem copying into generic Unix, Linux, and BSD implementations
  • 032be16: 8292066: Convert TestInputArgument.sh and TestSystemLoadAvg.sh to java version
  • e393973: 8292990: Improve test coverage for XPath Axes: parent
  • fa68371: 8292584: assert(cb != __null) failed: must be with -XX:-Inline
  • 04d8069: 8230374: maxOutputSize, instead of javatest.maxOutputSize, should be used in TEST.properties
  • 3d254d3: 8289510: Improve test coverage for XPath Axes: namespace
  • 2d18dda: 8173605: Remove support for source and target 1.7 option in javac
  • 7c2f299: 8293202: Document how to edit doc/testing, doc/building
  • 07616de: 8175382: clhsdb pmap should print the end addresses of the load modules
  • 9444a08: 8290709: Incorrect dominance error for unconditional pattern vs. null
  • ... and 1 more: https://git.openjdk.org/jdk/compare/5204528296a53d7dc77e67b26be23a64692527fa...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 1, 2022
@jonathan-gibbons
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Sep 1, 2022

Going to push as commit 0fb9469.
Since your change was applied there have been 11 commits pushed to the master branch:

  • 0a4d0ce: 8293121: (fs) Refactor UnixFileSystem copying into generic Unix, Linux, and BSD implementations
  • 032be16: 8292066: Convert TestInputArgument.sh and TestSystemLoadAvg.sh to java version
  • e393973: 8292990: Improve test coverage for XPath Axes: parent
  • fa68371: 8292584: assert(cb != __null) failed: must be with -XX:-Inline
  • 04d8069: 8230374: maxOutputSize, instead of javatest.maxOutputSize, should be used in TEST.properties
  • 3d254d3: 8289510: Improve test coverage for XPath Axes: namespace
  • 2d18dda: 8173605: Remove support for source and target 1.7 option in javac
  • 7c2f299: 8293202: Document how to edit doc/testing, doc/building
  • 07616de: 8175382: clhsdb pmap should print the end addresses of the load modules
  • 9444a08: 8290709: Incorrect dominance error for unconditional pattern vs. null
  • ... and 1 more: https://git.openjdk.org/jdk/compare/5204528296a53d7dc77e67b26be23a64692527fa...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 1, 2022
@openjdk openjdk bot closed this Sep 1, 2022
@jonathan-gibbons jonathan-gibbons deleted the 8290126.javadoctester-checkCrash branch September 1, 2022 22:41
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 1, 2022
@openjdk
Copy link

openjdk bot commented Sep 1, 2022

@jonathan-gibbons Pushed as commit 0fb9469.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated javadoc javadoc-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

3 participants