Skip to content

Commit

Permalink
Revert 238913 "Make gtest always use simple internal regex engine."
Browse files Browse the repository at this point in the history
Breaking base_unittests on a number of bots:
http://build.chromium.org/p/chromium.mac/builders/Mac%2010.6%20Tests%20%28dbg%29%283%29/builds/44666
http://build.chromium.org/p/chromium.linux/builders/Linux%20Clang%20%28dbg%29/builds/54034
http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%28dbg%29%281%29/builds/27229
http://build.chromium.org/p/chromium.memory/builders/Linux%20ASAN%20Tests%20%281%29/builds/21675
http://build.chromium.org/p/chromium.memory/builders/Mac%20ASAN%2064%20Tests%20%281%29/builds/216

> Make gtest always use simple internal regex engine.
> 
> In order to allow regex matches in gtest to be shared between Windows and other
> systems, we tell gtest to always use it's internal engine.
> 
> The syntax supported by the internal engine initially looks like a subset of
> POSIX regexs. However character class shortcuts are not valid POSIX.
> 
> Even more confusingly the system POSIX regex function often defines extra
> features not actually part of the standard allowing regex that work on Linux
> fail on Mac OS X.
> 
> A search through the code base did not reveal any locations where features not
> supported by the internal regex engine where used.
> 
> See bug https://code.google.com/p/chromium/issues/detail?id=317224 for more detailed description.
> 
> BUG=317224
> 
> Review URL: https://codereview.chromium.org/55983002

TBR=mithro@mithis.com

Review URL: https://codereview.chromium.org/100313003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238918 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
hashimoto@chromium.org committed Dec 5, 2013
1 parent 43d68be commit ff22714
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion base/message_loop/message_pump_io_ios_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ TEST_F(MessagePumpIOSForIOTest, TestWatchingFromBadThread) {
ASSERT_DEBUG_DEATH(io_loop()->WatchFileDescriptor(
STDOUT_FILENO, false, MessageLoopForIO::WATCH_READ, &watcher, &delegate),
"Check failed: "
"watch_file_descriptor_caller_checker_.CalledOnValidThread\\(\\)");
"watch_file_descriptor_caller_checker_.CalledOnValidThread()");
}

#endif // GTEST_HAS_DEATH_TEST && !defined(NDEBUG)
Expand Down
8 changes: 5 additions & 3 deletions base/process/memory_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ TEST(ProcessMemoryTest, MacMallocFailureDoesNotTerminate) {
buf = malloc(std::numeric_limits<size_t>::max() - (2 * PAGE_SIZE) - 1);
},
testing::KilledBySignal(SIGTRAP),
"\\*\\*\\* error: can't allocate region.*\\n?.*");
"\\*\\*\\* error: can't allocate region.*"
"(Terminating process due to a potential for future heap "
"corruption){0}");

base::debug::Alias(buf);
}
Expand All @@ -141,8 +143,8 @@ TEST(ProcessMemoryTest, MacTerminateOnHeapCorruption) {
ASSERT_DEATH(free(buf), "attempting free on address which "
"was not malloc\\(\\)-ed");
#else
ASSERT_DEATH(free(buf), "being freed.*\\n?\\.*"
"\\*\\*\\* set a breakpoint in malloc_error_break to debug.*\\n?.*"
ASSERT_DEATH(free(buf), "being freed.*"
"\\*\\*\\* set a breakpoint in malloc_error_break to debug.*"
"Terminating process due to a potential for future heap corruption");
#endif // ARCH_CPU_64_BITS || defined(ADDRESS_SANITIZER)
}
Expand Down
10 changes: 0 additions & 10 deletions testing/gtest.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,6 @@
'dependencies': [
'gtest_prod',
],
'defines': [
# In order to allow regex matches in gtest to be shared between Windows
# and other systems, we tell gtest to always use it's internal engine.
'GTEST_HAS_POSIX_RE=0',
],
'all_dependent_settings': {
'defines': [
'GTEST_HAS_POSIX_RE=0',
],
},
'conditions': [
['OS == "mac" or OS == "ios"', {
'sources': [
Expand Down

0 comments on commit ff22714

Please sign in to comment.