Fix allocation callback test to start at 0
authorCharles Giessen <charles@lunarg.com>
Tue, 3 Jan 2023 23:11:13 +0000 (16:11 -0700)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Mon, 9 Jan 2023 19:04:34 +0000 (12:04 -0700)
While working on the code, it is common to start the allocation tests at a fail_index
greater than zero, usually close to when the issue starts. This was accidentally
checked in, this commit fixes that mistake.

tests/loader_alloc_callback_tests.cpp

index 0f2f2d030f3a2eaab2932742b2593ee07bec6028..c7a4a1c454299183ee75dfa7cd07021dad08c5a7 100644 (file)
@@ -440,7 +440,7 @@ TEST(Allocation, DriverEnvVarIntentionalAllocFail) {
     driver_files += (fs::path("totally_made_up") / "path_to_fake" / "jason_file.json").str();
     set_env_var("VK_DRIVER_FILES", driver_files);
     EnvVarCleaner cleaner("VK_DRIVER_FILES");
-    size_t fail_index = 66;  // 0
+    size_t fail_index = 0;
     VkResult result = VK_ERROR_OUT_OF_HOST_MEMORY;
     while (result == VK_ERROR_OUT_OF_HOST_MEMORY && fail_index <= 10000) {
         MemoryTracker tracker(MemoryTrackerSettings{false, 0, true, fail_index});