KhronosGroup / Vulkan-ValidationLayers

Vulkan Validation Layers (VVL)
https://vulkan.lunarg.com/doc/sdk/latest/linux/khronos_validation_layer.html
Other
727 stars 396 forks source link

tests: Improve error checking/reporting in test surface creation #8194

Closed r-potter closed 1 week ago

r-potter commented 1 week ago

Without this change, running tests headlessly via SSH will fail to create a valid surface, but report success and subsequently crash in the ICD.

ci-tester-lunarg commented 1 week ago

Author r-potter not on autobuild list. Waiting for curator authorization before starting CI build.

ci-tester-lunarg commented 1 week ago

Author r-potter not on autobuild list. Waiting for curator authorization before starting CI build.

ci-tester-lunarg commented 1 week ago

Author r-potter not on autobuild list. Waiting for curator authorization before starting CI build.

spencer-lunarg commented 1 week ago

Author r-potter not on autobuild list.

I added you to the list and manually kicked off CI as well

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build queued with queue ID 206605.

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build # 16929 running.

r-potter commented 1 week ago

The following tests failed:

[ FAILED ] NegativeParent.Instance_PhysicalDeviceAndSurface [ FAILED ] NegativeParent.Instance_DeviceAndSurface [ FAILED ] NegativeParent.Instance_Surface_2 [ FAILED ] NegativeWsi.LeakASwapchain

However, they are all expecting surface creation to have succeeded in a headless environment (i.e. they only worked due to silently swallowing errors when XCB fails to open a valid connection). If we want this to work, then one approach would be to make use VK_EXT_headless_surface (https://gitlab.freedesktop.org/mesa/vulkan-wsi-layer/-/blob/master/README.md)

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build # 16929 passed.

spencer-lunarg commented 1 week ago

I think a better fix (for sure simpler) is going

-  ASSERT_EQ(VK_SUCCESS, CreateSurface(surface_context, instance2_surface.handle, instance2));
+   if (CreateSurface(surface_context, instance2_surface.handle, instance2) != VK_SUCCESS) {
+        GTEST_SKIP() << "Cannot create 2nd surface";
+   }

on them all

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build queued with queue ID 206654.

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build # 16930 running.

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build # 16930 passed.

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build queued with queue ID 206684.

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build # 16931 running.

ci-tester-lunarg commented 1 week ago

CI Vulkan-ValidationLayers build # 16931 passed.