RFR: 8313357: Revisit requiring SA tests on OSX to either run as root or use sudo
Chris Plummer
cjplummer at openjdk.org
Fri Aug 11 18:21:28 UTC 2023
On Fri, 11 Aug 2023 05:52:28 GMT, David Holmes <dholmes at openjdk.org> wrote:
> This seems reasonable in principle but I would be concerned about the overhead of exec'ing another process here. How many test actually use this? Is this query only ever executed per VM lifetime? (otherwise we should cache the result).
Every SA test uses it except I think one test that doesn't need any special privileges to run. That's about 65 tests.
This PR actually reduces the number of processes needed *IF* developer mode is enabled. Previously launching an SA tool required 3 processes: one to first check if passwordless sudo works, one to launch the SA tool with sudo, and one for the SA tool itself. So now there are 4 *IF* developer mode is not enabled (added a developer mode check), but there are only two if developer mode is enabled (developer mode check and SA tool launch).
BTW, one thing I didn't really call out in the description is that this allows the SA tests to be run when passwordless sudo is not enabled but developer mode is. Previously they would have just all thrown SkippedException.
I'm not sure about your caching question. I would assume you are asking how many times it executed per test, which is only once. I can't see caching between test runs because the setting can be changed by the user.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15238#issuecomment-1675171231
More information about the serviceability-dev
mailing list