Improve the sensitivity of the array_zero_value tests#4550
Improve the sensitivity of the array_zero_value tests#4550andyleiserson wants to merge 2 commits intogpuweb:mainfrom
array_zero_value tests#4550Conversation
|
Results for build job (at 8b7a140): -webgpu:shader,validation,expression,call,builtin,value_constructor:array_zero_value:* - 9 cases, 9 subcases (~1/case)
-webgpu:shader,validation,expression,call,builtin,value_constructor:array_value:* - 9 cases, 9 subcases (~1/case)
-webgpu:shader,validation,expression,call,builtin,value_constructor:struct_zero_value:* - 8 cases, 8 subcases (~1/case)
-webgpu:shader,validation,expression,call,builtin,value_constructor:struct_value:* - 8 cases, 8 subcases (~1/case)
+webgpu:shader,validation,expression,call,builtin,value_constructor:array_zero_value:* - 27 cases, 27 subcases (~1/case)
+webgpu:shader,validation,expression,call,builtin,value_constructor:array_value:* - 27 cases, 27 subcases (~1/case)
+webgpu:shader,validation,expression,call,builtin,value_constructor:struct_zero_value:* - 24 cases, 24 subcases (~1/case)
+webgpu:shader,validation,expression,call,builtin,value_constructor:struct_value:* - 24 cases, 24 subcases (~1/case)
-TOTAL: 285746 cases, 2344638 subcases
+TOTAL: 285814 cases, 2344706 subcases |
|
Does the sensitivity come from putting them in a function or must it also use let? |
|
Making it Although, it's not clear to me that there's as strong a distinction between the validation in these cases as I was originally thinking. I think naga should be raising the error it raises in const context ("type not constructible") for the let decls as well. I noticed this isssue because in reviewing gfx-rs/wgpu#8741 I went looking for a CTS test that would fail before the change, and found this test, but it wasn't failing. But I do understand that balancing the sensitivity of the tests vs. simplicity and clarity of the test cases is a tradeoff, it is okay with me if you don't want to take this change. |
|
Not necessarily. I almost wonder if we should have two versions (subcases) of the test since it sounds like they might be able to catch different problems. I'll leave that as optional though. Let me know if you want to make that change. If not, we can just get the branch up-to-date and merge it. |
In the cases where
valid = true, we want to test with aconstdeclaration, to ensure that the constructor is supported in const exprs. But in cases wherevalid = false, some of the subject types are not constructible, and may be rejected in a const declaration for that reason, even if the implementation is not properly restricting the use of zero-value constructors.This changes the test to use
constwhenvalid = trueandletwhenvalid = false, which make the the tests more sensitive to the functionality they are intending to cover.Tests still pass in Chrome. The
valid_arraycase is failing in Safari either with or without this change. With this change, theinvalid_rta,invalid_override_array, andinvalid_atomiccases fail in Firefox, which I believe accurately reflects defects in the implementation.Requirements for PR author:
.unimplemented()./** documented */and new helper files are found inhelper_index.txt.Requirements for reviewer sign-off:
When landing this PR, be sure to make any necessary issue status updates.