Don't use a regex to test the CPU vendor string.
This test will break if there is an unusual character in the vendor
string. Moreover, std::regex is banned in Chromium so the test is
blocking the roll.
Probably all that can meaningfully be tested here is that the vendor
string is non-empty, so do that instead.
Change-Id: I662fc635e27fde5aee293978263e5c948283e4fa
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1756327
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
GitOrigin-RevId: 6225d7890687204fdd4b69eb2646e16e98739d41
diff --git a/snapshot/win/system_snapshot_win_test.cc b/snapshot/win/system_snapshot_win_test.cc
index 3a76b9e..d93c654 100644
--- a/snapshot/win/system_snapshot_win_test.cc
+++ b/snapshot/win/system_snapshot_win_test.cc
@@ -17,7 +17,6 @@
#include <sys/time.h>
#include <time.h>
-#include <regex>
#include <string>
#include "build/build_config.h"
@@ -77,8 +76,7 @@
#if defined(ARCH_CPU_X86_FAMILY)
EXPECT_TRUE(cpu_vendor == "GenuineIntel" || cpu_vendor == "AuthenticAMD");
#elif defined(ARCH_CPU_ARM64)
- std::regex cpu_vendor_regex("[a-zA-Z0-9 \\-.]+");
- EXPECT_TRUE(std::regex_match(cpu_vendor, cpu_vendor_regex));
+ EXPECT_FALSE(cpu_vendor.empty());
#else
#error Unsupported Windows Arch
#endif