RFR: 8366369: Add @requires linux for GTK L&F tests [v2]
Alexey Ivanov
aivanov at openjdk.org
Tue Sep 16 13:55:10 UTC 2025
On Tue, 2 Sep 2025 17:53:02 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>>> > GTK L&F may be supported on other platforms but _it is not_.
>>>
>>> What's the point of testing on Windows and macOS? For the question above, it should be tested on Unix-like systems such as SAP or BSD.
>>
>> It should be tested on Unix-like systems if and only if GTK library is supported.
>>
>>> It is supported and certified on various systems, many of which do not include GTK. This is one of the reasons why failing to load the GTK library is not considered fatal.
>>
>> If GTK library isn't supported (or available) on a system, I see no reason in wasting time and even starting the test. It's the purpose of `@requires` expression that can be amended to include other platforms where GTK library is supported and, therefore, GTK Look-and-Feel can be instantiated.
>
>>It should be tested on Unix-like systems if and only if GTK library is supported.
>
> You’re excluding that possibility by using "@requires=linux". Instead, it should be handled the same way we check for other features like tray icon or multimonitor support by performing the check at the start of the test and exiting if the feature is not supported. You can exclude Windows and macOS but left other platforms as is.
>
>>If GTK library isn't supported (or available) on a system, I see no reason in wasting time and even starting the test. It's the purpose of @requires expression that can be amended to include other platforms where GTK library is supported and, therefore, GTK Look-and-Feel can be instantiated.
>
> We do not have "requires" for gtk, the "headful" and "linux" tags added to the tests are unrelated to the gtk.
I remember I wrote a comment where I asked @MBaesken if he could confirm that these tests are able to set GTK L&F on AIX or another non-Linux system, but I haven't posted it.
Anyway, I've amended the `@requires` condition to exclude Windows and macOS which leaves other Unix-like systems including Linux for running the test. Also, I throw `SkippedException` instead of failing the test if GTK L&F can't be set.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26995#discussion_r2352531618
More information about the client-libs-dev
mailing list