Fix waived tests being able to crash suite
authorDave Evans <d.evans@samsung.com>
Wed, 8 Sep 2021 17:03:23 +0000 (12:03 -0500)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Thu, 17 Feb 2022 22:47:57 +0000 (22:47 +0000)
- No longer calls TestCase constructor for waived tests

Components: Vulkan

VK-GL-CTS Issue: 3478

Change-Id: Iacc9049b71c8b479cc2c3e1e5b2f0cbea4c129af
(cherry picked from commit 44da8ba520e4929547a8b1daf90cf43fe42616fd)

external/vulkancts/modules/vulkan/vktTestPackage.cpp

index 1f2fea0..436d66c 100644 (file)
@@ -255,6 +255,9 @@ TestCaseExecutor::~TestCaseExecutor (void)
 
 void TestCaseExecutor::init (tcu::TestCase* testCase, const std::string& casePath)
 {
+       if (m_waiverMechanism.isOnWaiverList(casePath))
+               throw tcu::TestException("Waived test", QP_TEST_RESULT_WAIVER);
+
        TestCase*                                       vktCase                                         = dynamic_cast<TestCase*>(testCase);
        tcu::TestLog&                           log                                                     = m_context.getTestContext().getLog();
        const deUint32                          usedVulkanVersion                       = m_context.getUsedApiVersion();
@@ -269,9 +272,6 @@ void TestCaseExecutor::init (tcu::TestCase* testCase, const std::string& casePat
        if (!vktCase)
                TCU_THROW(InternalError, "Test node not an instance of vkt::TestCase");
 
-       if (m_waiverMechanism.isOnWaiverList(casePath))
-               throw tcu::TestException("Waived test", QP_TEST_RESULT_WAIVER);
-
        vktCase->checkSupport(m_context);
 
        vktCase->delayedInit();