Greg Roth e1f594323b Split gather offsets into separate test (#3712) 4 rokov pred
..
d3dreflect fd07613a95 Texture2DMS fixes: missing ResProp data; reflection default NumSamples = 0 (#3578) 5 rokov pred
dxil 3bd5f9ccfa Errors on non-immediate load/gather offsets (#3283) 5 rokov pred
hlsl e1f594323b Split gather offsets into separate test (#3712) 4 rokov pred
infra 4e5440e1ee Reorganize tests in CodegenHLSL for better clarity and coverage (#2456) 6 rokov pred
passes cf135fa88b Allow removal of trivially dead convergent marker (#3640) 4 rokov pred
pix 880c1359c5 PIX SM 6.6 resource access tracking (#3594) 5 rokov pred
rewriter 4211802b9a Support -line-directive in dxr. (#3027) 5 rokov pred
samples eaa7f95d07 Enable generation of llvm.lifetime.start/.end intrinsics (#3034) 5 rokov pred
shader_targets 162a1587c6 Fix detection of inner UDT ptr used by lowered intrinsic (DispatchMesh) (#3713) 4 rokov pred
validation 86104f415f Internal validator error messages don't need /Zi anymore. (#3606) 5 rokov pred
Readme.md 8d9e1cbb86 Dxil.dll <= 1.5 compat: Fix RDAT break and validation tests (#3117) 5 rokov pred

Readme.md

Files in this directory are executed using FileCheck in a batch mode.

There is a confirmation bias problem when testing debug info using file-check.

Say your test file contains:

// RUN: %dxc -E main -T vs_6_0 -Zi %s | FileCheck %s
// CHECK: foo
void main() {}

Due to /Zi, the !dx.source.contents metadata will be present and contain a string with the original source file. This means that the generated file contains your "// CHECK: foo", and hence the "foo" itself, so the check will succeed by default!

The current workaround is to include the following in your test to explicitly match the quoted source file:

// Exclude quoted source file (see readme)
// CHECK-LABEL: {{!"[^"]*\\0A[^"]*"}}

This will match a metadata string containing \0A (newline), which should only appear in the quoted source file. It will not match itself in the quoted source file because the regex won't match itself, and even less the escaped version of itself.

Note that if you see a failure on that line, it means that something else before that CHECK failed to match.