On Tue, 4 Jun 2024 13:02:18 GMT, Alexey Semenyuk <asemen...@openjdk.org> wrote:

>> Fix MainClassTest class to use HelloApp.AppOutputVerifier class to run app 
>> launcher instead of raw Executor. This makes MainClassTest test run app 
>> launchers with retries. This change addresses the primary issue.
>> 
>> Fix inconsistencies in HelloApp.AppOutputVerifier class. It used to provide 
>> API allowing to run launchers without retries. It inconsistently allowed the 
>> execution of launchers with suppressed output (stdout and stderr). It 
>> inconsistently executed launchers with/without PATH removed from the 
>> environment.
>> 
>> These loopholes were eliminated:
>> 
>>  - stdout and stderr of app launchers is never suppressed;
>>  - PATH env variable is always deleted for app launchers on Windows. It is 
>> not deleted on other platforms. This change sets the correct scope of 
>> [JDK-8254920](https://bugs.openjdk.org/browse/JDK-8254920) fix that 
>> introduced the removal of PATH env variable for app launchers;
>>  - app launchers are always executed with retries unless the launcher is 
>> executed with `jpackage.test.noexit` system property set to `true` 
>> indicating the test app will not terminate on its own.
>> 
>> Other changes are due to changes in HelloApp.AppOutputVerifier class.
>
> The crash is sporadic, hard to reproduce, and happens only on Linux.
> Almost every jpackage test runs a launcher, so the alternative to "hiding" 
> the issue was to disable all jpackage tests or make them not run launchers on 
> Linux. There is no good solution except nailing and fixing the root cause.

@alexeysemenyukoracle Would have been good to rename this JBS issue then to 
something like "rerun tests in case of crashes", since the issue, from the 
outside, looks like a fix for the crash itself.

This is mostly to make our lives easier when it comes to backporting (which may 
happen years from now, when everyone forgot what this was)

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

PR Comment: https://git.openjdk.org/jdk/pull/19502#issuecomment-2147486733

Reply via email to