Chromium Code Reviews| Index: base/debug/proc_maps_linux_unittest.cc |
| diff --git a/base/debug/proc_maps_linux_unittest.cc b/base/debug/proc_maps_linux_unittest.cc |
| index 9b7d7dcc4af3419c1ef0078eec4007f3fec804fa..7c2929f212a7ae60d16c5a9282053a541ca302a0 100644 |
| --- a/base/debug/proc_maps_linux_unittest.cc |
| +++ b/base/debug/proc_maps_linux_unittest.cc |
| @@ -180,14 +180,7 @@ TEST(ProcMapsTest, Permissions) { |
| } |
| } |
| -// ProcMapsTest.ReadProcMaps fails under TSan on Linux, |
| -// see http://crbug.com/258451. |
| -#if defined(THREAD_SANITIZER) |
| -#define MAYBE_ReadProcMaps DISABLED_ReadProcMaps |
| -#else |
| -#define MAYBE_ReadProcMaps ReadProcMaps |
| -#endif |
| -TEST(ProcMapsTest, MAYBE_ReadProcMaps) { |
| +TEST(ProcMapsTest, ReadProcMaps) { |
| std::string proc_maps; |
| ASSERT_TRUE(ReadProcMaps(&proc_maps)); |
| @@ -238,6 +231,13 @@ TEST(ProcMapsTest, MAYBE_ReadProcMaps) { |
| EXPECT_TRUE(found_address); |
| } |
| +TEST(ProcMapsTest, ReadProcMapsNonEmptyString) { |
| + std::string old_string("I forgot to clear the string"); |
| + std::string proc_maps(old_string); |
| + ASSERT_TRUE(ReadProcMaps(&proc_maps)); |
| + EXPECT_EQ(std::string::npos, proc_maps.find(old_string)); |
| +} |
| + |
|
Mark Mentovai
2013/09/05 19:25:50
It’d be good if there was a test that ensured that
scherkus (not reviewing)
2013/09/05 19:54:51
Yeah ... I'm inclined to pass as the ReadProcMaps
|
| TEST(ProcMapsTest, MissingFields) { |
| static const char* kTestCases[] = { |
| "00400000\n", // Missing end + beyond. |