On Mon, 28 Apr 2025 05:21:03 GMT, Abhishek Kumar <abhis...@openjdk.org> wrote:

> 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'm pretty sure it depends on hardware: how many configurations are returned 
and how easy the OS and CPU can handle lots of threads.

> 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().

I don't see how such a huge number of windows can possibly improve testing.

I'd say testing the default configuration which is the current one for the 
screen should be enough.

> 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)**.

I do not think so.

> @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 ?

As it looks, the test isn't valuable in its current state either way.

I don't think we'll be able to reproduce the original problem, yet it may be 
possible.

[The bug 
description](https://bugs.openjdk.org/browse/JDK-4312921#descriptionmodule) 
states,

> No images or few images showed up on the second screen, but the first screen 
> is messed up with images and text strings everywhere. Those wrong text 
> strings and images stay on the first screen even after the screenTest 
> application terminated. It seems not like the repaint problem since the 
> images were drawn to the wrong place at the first beginning.

Then [Phil says in his 
comment](https://bugs.openjdk.org/browse/JDK-4312921?focusedId=12554259&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12554259),

> The DGA docs are VERY misleading … indicate that the file descriptor returned 
> from `dga_draw_devfd` is per device. This is not always so as we discovered.

This could indicate that the issue is for Solaris only. However, 
`dga_draw_devfd` seems to be an X Server API, thus it may be applicable to 
Linux.

So, it's unclear whether the test could reproduce the original problem on 
Solaris. If it doesn't, removing the test is the solution.

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

PR Comment: https://git.openjdk.org/jdk/pull/24752#issuecomment-2835986581

Reply via email to