Skip SwapChainTests on experimental Linux/Intel

Skips all SwapChainTests on Linux + Intel + Vulkan + Mesa 23.2.1. This
is necessary because certain tests are crashing on this config, but the
crash originates in the SetUp code, and thus individual tests cannot be
skipped.

In order to limit the scope of these skips, also adds a new IsMesa check
to DawnTestBase.

Bug: dawn:2492
Change-Id: I6d69b07ebcea1576c87fc0b9a4b0ee4027d9d13d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/183020
Auto-Submit: Brian Sheedy <bsheedy@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
diff --git a/src/dawn/tests/DawnTest.cpp b/src/dawn/tests/DawnTest.cpp
index 3b38534..6896f61 100644
--- a/src/dawn/tests/DawnTest.cpp
+++ b/src/dawn/tests/DawnTest.cpp
@@ -940,6 +940,16 @@
 #endif
 }
 
+bool DawnTestBase::IsMesa(const std::string& mesaVersion) const {
+#if DAWN_PLATFORM_IS(LINUX)
+    std::string mesaString = "Mesa " + mesaVersion;
+    return mParam.adapterProperties.driverDescription.find(mesaString) == std::string::npos ? false
+                                                                                            : true;
+#else
+    return false;
+#endif
+}
+
 bool DawnTestBase::UsesWire() const {
     return gTestEnv->UsesWire();
 }
diff --git a/src/dawn/tests/DawnTest.h b/src/dawn/tests/DawnTest.h
index 7abc92c..e58f2f4 100644
--- a/src/dawn/tests/DawnTest.h
+++ b/src/dawn/tests/DawnTest.h
@@ -272,6 +272,8 @@
     bool IsMacOS(int32_t majorVersion = -1, int32_t minorVersion = -1) const;
     bool IsAndroid() const;
 
+    bool IsMesa(const std::string& mesaVersion = "") const;
+
     bool UsesWire() const;
     bool IsImplicitDeviceSyncEnabled() const;
     bool IsBackendValidationEnabled() const;
diff --git a/src/dawn/tests/end2end/SwapChainTests.cpp b/src/dawn/tests/end2end/SwapChainTests.cpp
index f007ae3..e1087c0 100644
--- a/src/dawn/tests/end2end/SwapChainTests.cpp
+++ b/src/dawn/tests/end2end/SwapChainTests.cpp
@@ -50,6 +50,10 @@
         DawnTest::SetUp();
         DAWN_TEST_UNSUPPORTED_IF(UsesWire());
 
+        // TODO(crbug.com/dawn/2492): Crashing on Ubuntu 22 (Mesa 23.2.1) + Intel UHD 630. Crash
+        // happens in SetUp code, so we cannot skip individual tests.
+        DAWN_TEST_UNSUPPORTED_IF(IsLinux() && IsIntel() && IsVulkan() && IsMesa("23.2.1"));
+
         glfwSetErrorCallback([](int code, const char* message) {
             ErrorLog() << "GLFW error " << code << " " << message;
         });