Avoid timeouts in dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail
authorChris Forbes <chrisforbes@google.com>
Wed, 14 Aug 2019 02:46:32 +0000 (19:46 -0700)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 5 Sep 2019 15:14:28 +0000 (11:14 -0400)
Components: Vulkan
Affects: dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail
VK-GL-CTS Issue: 1919
Google bug: b/139391065

Change-Id: Id5f20ef22147431aef2eabb97f2c7ef5171ed2ae

external/vulkancts/modules/vulkan/api/vktApiDeviceInitializationTests.cpp

index 3caa9da..413cb2d 100644 (file)
@@ -1251,6 +1251,12 @@ tcu::TestStatus createInstanceDeviceIntentionalAllocFail (Context& context)
                                return tcu::TestStatus::fail("Out of retries, could not create instance and device");
                }
 
+               // if the number of allocations the driver makes is large, we may end up
+               // taking more than the watchdog timeout. touch here to avoid spurious
+               // failures.
+               if (failIndex % 128 == 0)
+                       context.getTestContext().touchWatchdog();
+
                result = vkp.createInstance(&instanceCreateInfo, &allocationCallbacks, &instance);
 
                if (result == VK_ERROR_OUT_OF_HOST_MEMORY)