tests: GH428 Addition of tests for sync validation cases

This branch adds tests that challenge the validation layer on
various synchronization validation cases including:

5) INVALID_FENCE_STATE - call vkWaitFence with a fence
    that has not been submitted on a queue
    QueueForwardProgressFenceWait

Change-Id: If488bf95e9b2533203a661a7ef407b0ae82d6d63
diff --git a/tests/layer_validation_tests.cpp b/tests/layer_validation_tests.cpp
index 3d60a33..f256063 100644
--- a/tests/layer_validation_tests.cpp
+++ b/tests/layer_validation_tests.cpp
@@ -13902,15 +13902,19 @@
     vkDestroyPipelineLayout(m_device->device(), pipeline_layout, nullptr);
 }
 
-TEST_F(VkLayerTest, QueueForwardProgress) {
+TEST_F(VkLayerTest, QueueForwardProgressFenceWait) {
     TEST_DESCRIPTION("Call VkQueueSubmit with a semaphore that is already "
-                     "signaled but not waited on by the queue.");
+                     "signaled but not waited on by the queue. Wait on a "
+                     "fence that has not yet been submitted to a queue.");
 
     ASSERT_NO_FATAL_FAILURE(InitState());
     ASSERT_NO_FATAL_FAILURE(InitRenderTarget());
 
     const char *queue_forward_progress_message =
             " that has already been signaled but not waited on by queue 0x";
+    const char *invalid_fence_wait_message =
+            " which has not been submitted on a Queue or during "
+            "acquire next image.";
 
     BeginCommandBuffer();
     EndCommandBuffer();
@@ -13936,7 +13940,19 @@
     vkQueueSubmit(m_device->m_queue, 1, &submit_info, VK_NULL_HANDLE);
     m_errorMonitor->VerifyFound();
 
+    VkFenceCreateInfo fence_create_info = {};
+    fence_create_info.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO;
+    VkFence fence;
+    ASSERT_VK_SUCCESS(vkCreateFence(m_device->device(), &fence_create_info,
+                                    nullptr, &fence));
+
+    m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_WARNING_BIT_EXT,
+                                         invalid_fence_wait_message);
+    vkWaitForFences(m_device->device(), 1, &fence, VK_TRUE, UINT64_MAX);
+    m_errorMonitor->VerifyFound();
+
     m_errorMonitor->SetDesiredFailureMsg(0, "");
+    vkDestroyFence(m_device->device(), fence, nullptr);
     vkDestroySemaphore(m_device->device(), semaphore, nullptr);
 }