diff options
| author | sricker-nvidia <115114531+sricker-nvidia@users.noreply.github.com> | 2025-05-31 20:56:15 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-01 03:56:15 +0000 |
| commit | 43f057f2ff68e11a028da6eb1827a51e2566f636 (patch) | |
| tree | 9a2ed0cd8f573e9dcf6f5ce9f934f755d62d972c /tools/test-server/test-server-main.cpp | |
| parent | da5cf478c6be06c9e6c20917a7d472cbdcb624e3 (diff) | |
Fix test-server debug issues with gfx-unit-test-tool (#7119) (#7279)
Previously when running slang-test with "-use-test-server" to run
slang-unit-test-tool and gfx-unit-test-tool tests, these would
fail with a message like, "error: Unable to launch tool". These issues
appear to have been resolved, however debug runs of gfx-unit-test-tool
using "-use-test-server" were still showing errors of the following
nature:
````
error: rpc failed
error: result code = -858993460
standard error = {
}
standard output = {
}
ignored test: 'gfx-unit-test-tool/uint16BufferTestVulkan.internal'
````
These errors all appeared to be the result of Vulkan VUID print outs
and were occuring for nearly every Vulkan test.
Existing comments in slang-test-main.cpp indicated that VUID print outs
get misinterpreted as the result from a test due to limitations in the
Slang RPC implementation. Slang-test then correctly disables use of VK
debug layers when the spawn type is UseTestServer. However, this argument
is only passed to the test server when running standard tests (see
ExecuteToolTestArgs vs ExecuteUnitTestArgs).
This change hard codes `unitTestContext.enableDebugLayers = false;` in
test-server-main.cpp when running unit tests, as otherwise this will
currently result in all Vulkan tests being ignored.
Additional tweaks were made to slang-test-main.cpp to restore the spawn
type for unit tests and to prevent bogus rpc error result codes.
Diffstat (limited to 'tools/test-server/test-server-main.cpp')
| -rw-r--r-- | tools/test-server/test-server-main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/test-server/test-server-main.cpp b/tools/test-server/test-server-main.cpp index 3faa6352f..c00cab428 100644 --- a/tools/test-server/test-server-main.cpp +++ b/tools/test-server/test-server-main.cpp @@ -446,6 +446,12 @@ SlangResult TestServer::_executeUnitTest(const JSONRPCCall& call) unitTestContext.workDirectory = ""; unitTestContext.enabledApis = RenderApiFlags(args.enabledApis); unitTestContext.executableDirectory = m_exeDirectory.getBuffer(); + // When using test server, any validation warning printed from the backend + // gets misinterpreted as the result from the test. + // This is due to the limitation that Slang RPC implementation expects only + // one time communication. Set enableDebugLayers to false to avoid Vulkan + // test failures when running on debug using test server. + unitTestContext.enableDebugLayers = false; auto testCount = testModule->getTestCount(); SLANG_ASSERT(testIndex >= 0 && testIndex < testCount); |
