OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #define _CRT_SECURE_NO_WARNINGS | 5 #define _CRT_SECURE_NO_WARNINGS |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/alias.h" | 10 #include "base/debug/alias.h" |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 return 1; | 233 return 1; |
234 } | 234 } |
235 | 235 |
236 // This test intentionally crashes, so we don't need to run it under | 236 // This test intentionally crashes, so we don't need to run it under |
237 // AddressSanitizer. | 237 // AddressSanitizer. |
238 #if defined(ADDRESS_SANITIZER) || defined(SYZYASAN) | 238 #if defined(ADDRESS_SANITIZER) || defined(SYZYASAN) |
239 #define MAYBE_GetTerminationStatusCrash DISABLED_GetTerminationStatusCrash | 239 #define MAYBE_GetTerminationStatusCrash DISABLED_GetTerminationStatusCrash |
240 #else | 240 #else |
241 #define MAYBE_GetTerminationStatusCrash GetTerminationStatusCrash | 241 #define MAYBE_GetTerminationStatusCrash GetTerminationStatusCrash |
242 #endif | 242 #endif |
243 TEST_F(ProcessUtilTest, MAYBE_GetTerminationStatusCrash) { | 243 // TODO(scottmg): http://crbug.com/461160 |
| 244 TEST_F(ProcessUtilTest, DISABLED_GetTerminationStatusCrash) { |
244 const std::string signal_file = | 245 const std::string signal_file = |
245 ProcessUtilTest::GetSignalFilePath(kSignalFileCrash); | 246 ProcessUtilTest::GetSignalFilePath(kSignalFileCrash); |
246 remove(signal_file.c_str()); | 247 remove(signal_file.c_str()); |
247 base::Process process = SpawnChild("CrashingChildProcess"); | 248 base::Process process = SpawnChild("CrashingChildProcess"); |
248 ASSERT_TRUE(process.IsValid()); | 249 ASSERT_TRUE(process.IsValid()); |
249 | 250 |
250 int exit_code = 42; | 251 int exit_code = 42; |
251 EXPECT_EQ(base::TERMINATION_STATUS_STILL_RUNNING, | 252 EXPECT_EQ(base::TERMINATION_STATUS_STILL_RUNNING, |
252 base::GetTerminationStatus(process.Handle(), &exit_code)); | 253 base::GetTerminationStatus(process.Handle(), &exit_code)); |
253 EXPECT_EQ(kExpectedStillRunningExitCode, exit_code); | 254 EXPECT_EQ(kExpectedStillRunningExitCode, exit_code); |
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1058 options.current_directory = base::FilePath("/dev/null"); | 1059 options.current_directory = base::FilePath("/dev/null"); |
1059 | 1060 |
1060 base::Process process(SpawnChildWithOptions("SimpleChildProcess", options)); | 1061 base::Process process(SpawnChildWithOptions("SimpleChildProcess", options)); |
1061 ASSERT_TRUE(process.IsValid()); | 1062 ASSERT_TRUE(process.IsValid()); |
1062 | 1063 |
1063 int exit_code = kSuccess; | 1064 int exit_code = kSuccess; |
1064 EXPECT_TRUE(process.WaitForExit(&exit_code)); | 1065 EXPECT_TRUE(process.WaitForExit(&exit_code)); |
1065 EXPECT_NE(kSuccess, exit_code); | 1066 EXPECT_NE(kSuccess, exit_code); |
1066 } | 1067 } |
1067 #endif | 1068 #endif |
OLD | NEW |