RFR: 8351851: Update PmemTest to run on AMD64

Andrew Dinn adinn at openjdk.org
Wed Apr 16 12:16:55 UTC 2025


On Wed, 16 Apr 2025 11:10:22 GMT, Mark Sheppard <msheppar at openjdk.org> wrote:

>>> It would be preferable if we retained the current test structure and swap
>> the x86_64 with amd64, as amd64 is the os.arch on which the test will be run
>> 
>> When I wrote my previous comment I was under the impression that `@requires(os.arch == "x86_64")` selects Intel x86 64-bit only while `@requires(os.arch == "amd64")` selects either Intel x86 64-bit or AMD x86 64-bit. However, having looked through the code in files:
>> 
>> test/jdk/jdk/internal/util/ArchTest.java
>> src/java.base/share/classes/jdk/internal/util/Architecture.java
>> src/java.base/share/classes/jdk/internal/util/PlatformProps.java
>> /make/modules/java.base/gensrc/GensrcMisc.gmk
>> 
>> it appears to me that these two `@requires` clauses select the same thing i.e. either Intel x86 64-bit or AMD x86 64-bit. In which case the current config should mean that this test will run on AMD CPUs. Is that not the case?
>
>> > It would be preferable if we retained the current test structure and swap
>> > the x86_64 with amd64, as amd64 is the os.arch on which the test will be run
>> 
>> When I wrote my previous comment I was under the impression that `@requires(os.arch == "x86_64")` selects Intel x86 64-bit only while `@requires(os.arch == "amd64")` selects either Intel x86 64-bit or AMD x86 64-bit. However, having looked through the code in files:
>> 
>> ```
>> test/jdk/jdk/internal/util/ArchTest.java
>> src/java.base/share/classes/jdk/internal/util/Architecture.java
>> src/java.base/share/classes/jdk/internal/util/PlatformProps.java
>> /make/modules/java.base/gensrc/GensrcMisc.gmk
>> ```
>> 
>> it appears to me that these two `@requires` clauses select the same thing i.e. either Intel x86 64-bit or AMD x86 64-bit. In which case the current config should mean that this test will run on AMD CPUs. Is that not the case?
> 
> Thanks for the details above. Currently the main linux execution platforms are returning "amd64" for the OS arch,  and that is not picked up by the current   @requires (os.arch == "x86_64")
> to run on amd64 necessitates the removal of the @ignores directive 
> so this is a pragmatic change to facilitate the manual execution of the most prevalent amd64 test environments.
> 
> It was observed that there might be a separate issue for jtreg on the @requires and
> based on your feedback, and expectations there is a separate jtreg  issue to investigate the consistency of @requires on the os.arch attribute.

@msheppar Thanks for clarifying what is at stake here. I am afraid don't know enough about the mechanics of the test infrastructure to explain why it is working the way you describe. However, given what you have observed I agree with your suggestion above that the right solution is to keep the two test declarations but switch "amd64" for "x86_64" and vice versa. That should make the tests work on amd64 CPUs while leaving it clear how anyone wanting to test on an alternative CPU would need to modify the test. I'll be happy to review the PR if it includes that change.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/24416#issuecomment-2809394333


More information about the nio-dev mailing list