eclipse.platform.swt icon indicating copy to clipboard operation
eclipse.platform.swt copied to clipboard

GTK4: Test_org_eclipse_swt_widgets_Display.test_getCursorLocation test fail.

Open raghucssit opened this issue 2 months ago • 5 comments

[ERROR] org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Display.test_getCursorLocation -- Time elapsed: 0.034 s <<< FAILURE!
2025-09-08T15:17:38.7892350Z org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
2025-09-08T15:17:38.7893620Z 	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
2025-09-08T15:17:38.7894948Z 	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
2025-09-08T15:17:38.7896128Z 	at org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
2025-09-08T15:17:38.7897078Z 	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
2025-09-08T15:17:38.7897970Z 	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:31)
2025-09-08T15:17:38.7898873Z 	at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:183)
2025-09-08T15:17:38.7900226Z 	at org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Display.test_getCursorLocation(Test_org_eclipse_swt_widgets_Display.java:345)
2025-09-08T15:17:38.7901601Z 	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
2025-09-08T15:17:38.7902705Z 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
2025-09-08T15:17:38.7903567Z 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)

raghucssit avatar Sep 15 '25 11:09 raghucssit

This test passes fine on my environment:

Software Information:

  • Firmware Version: edk2-20221207gitfff6d81270b5-9.el9_2
  • OS Name: Red Hat Enterprise Linux 10.0 (Coughlan)
  • OS Build: (null)
  • OS Type: 64-bit
  • GNOME Version: 47
  • Windowing System: Wayland
  • Kernel Version: Linux 6.12.0-55.9.1.el10_0.x86_64

Theme: Default

Image

Test Result:

Image

raghucssit avatar Sep 15 '25 11:09 raghucssit

The machine is a fresh install there are no special theming or any graphics related applications installed. Except some bitmap image support packages and webkit. I think build machine lacks some packages/some OS configuration.

raghucssit avatar Sep 15 '25 11:09 raghucssit

@raghucssit I think one should enhance the test to at least mention the actual values in the message.

We install the following packages: https://github.com/eclipse-platform/eclipse.platform.swt/blob/508ad4a15bb54e280b1727db2f4dd5bd3fc4ba17/.github/workflows/maven.yml#L47-L51

laeubi avatar Sep 15 '25 11:09 laeubi

@raghucssit I think one should enhance the test to at least mention the actual values in the message.

We install the following packages:

eclipse.platform.swt/.github/workflows/maven.yml

Lines 47 to 51 in 508ad4a - name: Install Linux requirements if: ${{ matrix.config.native == 'gtk.linux.x86_64'}} run: | sudo apt-get update -qq
sudo apt-get install -qq -y libgtk-3-dev libgtk-4-dev freeglut3-dev webkit2gtk-driver

I will improve assert error message.

raghucssit avatar Sep 15 '25 11:09 raghucssit

ERROR] Tests run: 63, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 16.56 s <<< FAILURE! -- in org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Display
2025-09-15T12:16:35.2100017Z [ERROR] org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Display.test_getCursorLocation -- Time elapsed: 0.059 s <<< FAILURE!
2025-09-15T12:16:35.2102084Z org.opentest4j.AssertionFailedError: Display's cursor location x co-ordinate should be positive. But it is: -1 ==> expected: <true> but was: <false>

It returns negative cursor location

raghucssit avatar Sep 15 '25 13:09 raghucssit