On Sat, 26 Apr 2025 20:34:43 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:
> The test doesn't work on Linux either. The problem on Linux is that there are > too many graphics configurations are returned. > > On my Fedora Linux 42 with two monitors, `gs[j].getConfigurations()` returns > an array of length **176**. > > It could be the reason why the loop divides the number of configurations: > `gc.length / 2`. > > In the end, this loop creates **176** window and a thread for each of the > windows. This hangs GNOME shell completely. A few times, I was able to kill > the `java` process via SSH connection, but it doesn't always help, and it > still takes quite a while to get back to responsive UI. > > I'm sure this problem was discussed somewhere… (I'll search for that > discussion later.) We should limit testing to default configurations only. > > As for Windows, the test could be usable on Windows and macOS if you remove > replace `< gc.length / 2` with `< gc.length` as @kboulanou suggested > initially. On Windows and macOS, there's usually only one configuration > returned from `gs[j].getConfigurations()` for each screen. I tested on Ubuntu 22.04 and don't find any issues. `gs[j].getConfigurations()` returns an array of length **120**, it took sometime to get back to responsive UI but the waiting time is not that much. Seems creating another **38** windows and a thread for each window causing more overhead in your case. I agree that `gc.length/2` is to reduce the number of frames created on the screen to avoid the hang. If the testing doesn't require so many frames to create then it can be reduced for linux as well (may be 5 or something based on the `gc.length` returned from `gs[j].getConfigurations(). Since the original bug was raised for Solaris, I suggested to drop the testing for Windows and Mac. As per the bug description, `The picture is: No images or few images showed up on the second screen, but the first screen is messed up with images and text strings everywhere.`, my assumption is **creating multiple frames with images and text strings may be the requirement (although it's not clearly mentioned)**. @aivanov-jdk If we replace `< gc.length / 2` with `< gc.length` on Windows and Mac, we will have less frames to test. I agree this will make the test to run but will it add any value to it ? ------------- PR Comment: https://git.openjdk.org/jdk/pull/24752#issuecomment-2834011543