Skip to content

Commit

Permalink
Do not fail display tests when there is no display
Browse files Browse the repository at this point in the history
Instead, we should mark these tests as not supported. It is valid per the
Vulkan spec to have the extension report 0 displays connected.

Affects: dEQP-VK.wsi.display.*

Component: Vulkan

VK-GL-CTS issue: 1105

Change-Id: Idfe09ec588be7b4c6c782e306e7bf1506d78808f
  • Loading branch information
damienleone authored and alegal-arm committed Apr 5, 2018
1 parent eab78dc commit 437211f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions external/vulkancts/modules/vulkan/wsi/vktWsiDisplayTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ tcu::TestStatus DisplayCoverageTestInstance::testGetPhysicalDeviceDisplayPropert
TCU_FAIL_STR(string("Expected VK_SUCCESS. Have ") + getResultAsString(result));

if (displayCountReported == 0)
TCU_THROW(ResourceError, std::string("Cannot perform test: no displays found").c_str());
TCU_THROW(NotSupportedError, std::string("Cannot perform test: no displays found").c_str());

displayCountToTest = displayCountReported;
if (displayCountReported > MAX_TESTED_DISPLAY_COUNT)
Expand Down Expand Up @@ -902,7 +902,7 @@ tcu::TestStatus DisplayCoverageTestInstance::testGetPhysicalDeviceDisplayPlanePr
TCU_FAIL("Failed to retrieve displays");

if (displaysVector.empty())
TCU_FAIL("No displays reported");
TCU_THROW(NotSupportedError, "No displays reported");

displaySet = DisplaySet(displaysVector.begin(), displaysVector.end());

Expand Down Expand Up @@ -1025,7 +1025,7 @@ tcu::TestStatus DisplayCoverageTestInstance::testGetDisplayPlaneSupportedDisplay
TCU_FAIL("Failed to retrieve displays");

if (displaysVector.empty())
TCU_FAIL("No displays reported");
TCU_THROW(NotSupportedError, "No displays reported");

displaySet = DisplaySet(displaysVector.begin(), displaysVector.end());

Expand Down Expand Up @@ -1149,7 +1149,7 @@ tcu::TestStatus DisplayCoverageTestInstance::testGetDisplayModePropertiesKHR (vo
TCU_FAIL("Failed to retrieve displays list");

if (displaysVector.empty())
TCU_FAIL("No displays reported");
TCU_THROW(NotSupportedError, "No displays reported");

for (DisplayVector::iterator it = displaysVector.begin();
it != displaysVector.end();
Expand Down Expand Up @@ -1241,7 +1241,7 @@ tcu::TestStatus DisplayCoverageTestInstance::testCreateDisplayModeKHR (void)
TCU_FAIL("Failed to retrieve displays");

if (displaysVector.empty())
TCU_FAIL("No displays reported");
TCU_THROW(NotSupportedError, "No displays reported");

for (DisplayVector::iterator it = displaysVector.begin();
it != displaysVector.end();
Expand Down Expand Up @@ -1533,7 +1533,7 @@ tcu::TestStatus DisplayCoverageTestInstance::testCreateDisplayPlaneSurfaceKHR (v
TCU_FAIL("Failed to retrieve displays");

if (displaysVector.empty())
TCU_FAIL("No displays reported");
TCU_THROW(NotSupportedError, "No displays reported");

// Iterate through displays-modes
for (DisplayVector::iterator it = displaysVector.begin();
Expand Down

0 comments on commit 437211f

Please sign in to comment.