Skip Buffer OOM tests when using ASAN
ASAN throws when hitting OOM conditions which these tests intentionally try to create. Bug: dawn:450 Change-Id: I635480ae329cd5ace55287d77e2b79e663174f49 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23246 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
90abd47a28
commit
0e9e5ee8aa
|
@ -691,6 +691,14 @@ bool DawnTestBase::IsSpvcParserBeingUsed() const {
|
||||||
return gTestEnv->IsSpvcParserBeingUsed();
|
return gTestEnv->IsSpvcParserBeingUsed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool DawnTestBase::IsAsan() const {
|
||||||
|
#if defined(ADDRESS_SANITIZER)
|
||||||
|
return true;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
bool DawnTestBase::HasVendorIdFilter() const {
|
bool DawnTestBase::HasVendorIdFilter() const {
|
||||||
return gTestEnv->HasVendorIdFilter();
|
return gTestEnv->HasVendorIdFilter();
|
||||||
}
|
}
|
||||||
|
|
|
@ -250,6 +250,8 @@ class DawnTestBase {
|
||||||
bool IsSpvcBeingUsed() const;
|
bool IsSpvcBeingUsed() const;
|
||||||
bool IsSpvcParserBeingUsed() const;
|
bool IsSpvcParserBeingUsed() const;
|
||||||
|
|
||||||
|
bool IsAsan() const;
|
||||||
|
|
||||||
void StartExpectDeviceError();
|
void StartExpectDeviceError();
|
||||||
bool EndExpectDeviceError();
|
bool EndExpectDeviceError();
|
||||||
|
|
||||||
|
|
|
@ -526,6 +526,7 @@ TEST_P(BufferTests, ZeroSizedBuffer) {
|
||||||
TEST_P(BufferTests, CreateBufferOOM) {
|
TEST_P(BufferTests, CreateBufferOOM) {
|
||||||
// TODO(http://crbug.com/dawn/27): Missing support.
|
// TODO(http://crbug.com/dawn/27): Missing support.
|
||||||
DAWN_SKIP_TEST_IF(IsOpenGL());
|
DAWN_SKIP_TEST_IF(IsOpenGL());
|
||||||
|
DAWN_SKIP_TEST_IF(IsAsan());
|
||||||
|
|
||||||
wgpu::BufferDescriptor descriptor;
|
wgpu::BufferDescriptor descriptor;
|
||||||
descriptor.usage = wgpu::BufferUsage::CopyDst;
|
descriptor.usage = wgpu::BufferUsage::CopyDst;
|
||||||
|
@ -545,6 +546,7 @@ TEST_P(BufferTests, CreateBufferOOM) {
|
||||||
TEST_P(BufferTests, CreateBufferMappedOOM) {
|
TEST_P(BufferTests, CreateBufferMappedOOM) {
|
||||||
// TODO(http://crbug.com/dawn/27): Missing support.
|
// TODO(http://crbug.com/dawn/27): Missing support.
|
||||||
DAWN_SKIP_TEST_IF(IsOpenGL());
|
DAWN_SKIP_TEST_IF(IsOpenGL());
|
||||||
|
DAWN_SKIP_TEST_IF(IsAsan());
|
||||||
|
|
||||||
// Test non-mappable buffer
|
// Test non-mappable buffer
|
||||||
{
|
{
|
||||||
|
@ -592,6 +594,7 @@ TEST_P(BufferTests, CreateBufferMappedOOM) {
|
||||||
TEST_P(BufferTests, CreateBufferOOMMapReadAsync) {
|
TEST_P(BufferTests, CreateBufferOOMMapReadAsync) {
|
||||||
// TODO(http://crbug.com/dawn/27): Missing support.
|
// TODO(http://crbug.com/dawn/27): Missing support.
|
||||||
DAWN_SKIP_TEST_IF(IsOpenGL());
|
DAWN_SKIP_TEST_IF(IsOpenGL());
|
||||||
|
DAWN_SKIP_TEST_IF(IsAsan());
|
||||||
|
|
||||||
auto RunTest = [this](const wgpu::BufferDescriptor& descriptor) {
|
auto RunTest = [this](const wgpu::BufferDescriptor& descriptor) {
|
||||||
wgpu::Buffer buffer;
|
wgpu::Buffer buffer;
|
||||||
|
@ -632,6 +635,7 @@ TEST_P(BufferTests, CreateBufferOOMMapReadAsync) {
|
||||||
TEST_P(BufferTests, CreateBufferOOMMapWriteAsync) {
|
TEST_P(BufferTests, CreateBufferOOMMapWriteAsync) {
|
||||||
// TODO(http://crbug.com/dawn/27): Missing support.
|
// TODO(http://crbug.com/dawn/27): Missing support.
|
||||||
DAWN_SKIP_TEST_IF(IsOpenGL());
|
DAWN_SKIP_TEST_IF(IsOpenGL());
|
||||||
|
DAWN_SKIP_TEST_IF(IsAsan());
|
||||||
|
|
||||||
auto RunTest = [this](const wgpu::BufferDescriptor& descriptor) {
|
auto RunTest = [this](const wgpu::BufferDescriptor& descriptor) {
|
||||||
wgpu::Buffer buffer;
|
wgpu::Buffer buffer;
|
||||||
|
|
Loading…
Reference in New Issue