jcstress icon indicating copy to clipboard operation
jcstress copied to clipboard

7903671: jcstress: Update buffer tests for JDK-8318966

Open judovana opened this issue 8 months ago • 16 comments
trafficstars

part 1: Detecting jdk of target VM and exuding illegible tests

This is prequel to full fixing of CODETOOLS-7903671. This PR detects target JDK version and then disables illegible tests. part 2 will be done in templates of affected tests and logic around generating the classes from them. In meantime this should server.

The jdk detection will be most likely used anyway. WDYT? If we agree on similar approach, I will create a new bug for this PR only.


Progress

  • [x] Change must not contain extraneous whitespace
  • [ ] Change must be properly reviewed (1 review required, with at least 1 Committer)

Issue

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 159

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jcstress/pull/159.diff

Using Webrev

Link to Webrev Comment

judovana avatar Feb 26 '25 17:02 judovana

:wave: Welcome back jvanek! 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.

bridgekeeper[bot] avatar Feb 26 '25 17:02 bridgekeeper[bot]

❗ This change is not yet ready to be integrated. See the Progress checklist in the description for automated requirements.

openjdk[bot] avatar Feb 26 '25 17:02 openjdk[bot]

Webrevs

mlbridge[bot] avatar Feb 26 '25 17:02 mlbridge[bot]

I made a much more deeper look, and consulted with Aph and Thomas, and it seems that for jdk 23 and up, the correct replacement are direct buffers - which - feel free to correct me - are well covered in jcstress,

Thus the buffer tests should be conditionally excluded, as here, or removed.

judovana avatar Mar 03 '25 10:03 judovana

@judovana This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Mar 31 '25 13:03 bridgekeeper[bot]

I still have faith!

judovana avatar Mar 31 '25 13:03 judovana

@judovana This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Apr 28 '25 16:04 bridgekeeper[bot]

loosing faith:(

judovana avatar Apr 28 '25 18:04 judovana

../live..

judovana avatar May 21 '25 12:05 judovana

hi! Thanx a lot for eyball!

If this should be the way, that I would rather run it with alignment 1 then stay with error. The error seem redundant here. JCStress is doing a lot of checks, and the final runs are based on this. Checking the java version or ByteBuffer impl seems more reasonable.. However as far as I can tell, the alignment 1 is not triggering the parts it was with 8 and thus not testing what it should.

Sorry to say that, but I have doubts that the ByteBuffer tests are handled as soft errors. If that would be the case I think I would not bother with PR. "api mismatch" would be good enough. But as you know much better, I will try and elaborate. If they are not returning api mismatch, then I will elaborate in this PR so they start to return api mismatch.

judovana avatar Jun 06 '25 15:06 judovana

To emphasize, my point is that alignment(8) is a behavior that someone likely depends on in earlier JDKs. We need to continue testing that. So alignment(8) should stay until the last JDK that supports it, dies. Yes, it would make sense to make sure that alignment(8) return API mismatch when run with incompatible JDK. I thought it does. If it does not, that would definitely need improvement.

shipilev avatar Jun 06 '25 15:06 shipilev

Ack. Wdyt about keeping the java version check, and on newer jdks set it to 1 then?

judovana avatar Jun 06 '25 15:06 judovana

Ack. Wdyt about keeping the java version check, and on newer jdks set it to 1 then?

Maybe, but likely not. I could see how JDK-specific test behavior would be confusing: you run seemingly the same test on different JDKs, but you actually run different tests? Bisecting for regressions would get extra fun.

So, I would like all JDK versions attempt to run all the tests, and gracefully fail out some of them. So older JDKs would test both alignment(1) and alignment(8). Newer JDKs only run alignment(8) tests.

shipilev avatar Jun 06 '25 15:06 shipilev

You mean " So older JDKs would test both alignment(1) and alignment(8). Newer JDKs only run alignment(1) tests." right? Well that make sense to me.

judovana avatar Jun 06 '25 15:06 judovana

Yes. We strive to test everything that users would likely end up using.

shipilev avatar Jun 06 '25 15:06 shipilev

@judovana Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

openjdk[bot] avatar Jun 23 '25 09:06 openjdk[bot]

Finally have time to look at this.

No, we are not going to hard-code test names in generic harness code. The common way to "skip" the test that are incompatible with some JDKs is to record them as "soft errors", which make them skipped. This is what CODETOOLS-7903695 did, and it is supposed to be enough.

Ok. you are right. They are just api-mishmash, so soft errors, so ignored. Not sure when I run it last so it was so intrusive it led me to create and elaborate on CODETOOLS-7903671. That sounds like this PR is indeed no go.

I'm tempted to add the alignment(1) variants so jdk24+ do not suffer the lack of coverage. What is your advice here?

judovana avatar Jul 04 '25 16:07 judovana

faith restored

judovana avatar Jul 16 '25 14:07 judovana

@judovana This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Aug 13 '25 21:08 bridgekeeper[bot]

Is there hope?

judovana avatar Aug 14 '25 11:08 judovana

@judovana This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Sep 12 '25 00:09 bridgekeeper[bot]

Loosing the faith...

judovana avatar Sep 12 '25 10:09 judovana

@judovana This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Oct 10 '25 15:10 bridgekeeper[bot]

Loosing the faith...

judovana avatar Oct 13 '25 07:10 judovana

@judovana This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Nov 10 '25 20:11 bridgekeeper[bot]

keep_alive

judovana avatar Nov 11 '25 08:11 judovana