[jdk11u-dev] RFR: 8238268: Many SA tests are not running on OSX because they do not attempt to use sudo when available [v3]

Goetz Lindenmaier goetz at openjdk.org
Mon Jul 25 09:50:49 UTC 2022


On Sat, 23 Jul 2022 09:32:05 GMT, Christoph Langer <clanger at openjdk.org> wrote:

>> This is a backport of [JDK-8238268](https://bugs.openjdk.org/browse/JDK-8238268). We need it, because the backport of [JDK-8215544](https://bugs.openjdk.org/browse/JDK-8215544) has added code that calls `sudo -E` on MacOS without the option `-n`. This call might not return when sudo starts prompting for a password. In our CI it leads to hanging processes when subsequent tests call sudo, even with the -n option. This fix rectifies that behavior. And, after all, it improves test coverage on MacOS, so it's a good backport candidate.
>
> Christoph Langer has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
> 
>   Backport a147636157c011dac5d8c7aa6809c3c55f1384fa

Hi

you add a very thorough description why you backport this.
This should go to the JBS fix comment. 
Unfortunately it does not help reviewing the change.
I assume you ran SAP testing on this.

Here my comments:

test/hotspot/jtreg/TEST.ROOT
Copyright. ok. 

test/hotspot/jtreg/serviceability/sa/ClhsdbLauncher.java
Why do you remove 
   `processBuilder.redirectError(ProcessBuilder.Redirect.INHERIT);`

The special check for OSX is removed in several tests.
It looks different in 11 and the original change, but as
the code is removed this does not matter.

test/hotspot/jtreg/serviceability/sa/TestUniverse.java
Chunk for new test not in 11 omitted


test/hotspot/jtreg/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java
Besides replaceing shouldSAAttach by isRoot, isSigned OSX is added. 

test/jdk/sun/tools/jhsdb/HeapDumpTestWithActiveProcess.java
Chunk is omitted. Test is not in 11.

test/jtreg-ext/requires/VMProps.java
Copyright.

test/lib/jdk/test/lib/Platform.java
Imports were adapted.
isSignedOSX() is added. What is the original change of this?
Please mention in the JBS FixRequest comment that you 
include code from that change.

test/lib/jdk/test/lib/SA/SATestUtils.java
Imports were adapted.

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

PR: https://git.openjdk.org/jdk11u-dev/pull/1269


More information about the jdk-updates-dev mailing list