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 // TODO(scottmg): http://crbug.com/461160 | 243 TEST_F(ProcessUtilTest, MAYBE_GetTerminationStatusCrash) { |
244 TEST_F(ProcessUtilTest, DISABLED_GetTerminationStatusCrash) { | |
245 const std::string signal_file = | 244 const std::string signal_file = |
246 ProcessUtilTest::GetSignalFilePath(kSignalFileCrash); | 245 ProcessUtilTest::GetSignalFilePath(kSignalFileCrash); |
247 remove(signal_file.c_str()); | 246 remove(signal_file.c_str()); |
248 base::Process process = SpawnChild("CrashingChildProcess"); | 247 base::Process process = SpawnChild("CrashingChildProcess"); |
249 ASSERT_TRUE(process.IsValid()); | 248 ASSERT_TRUE(process.IsValid()); |
250 | 249 |
251 int exit_code = 42; | 250 int exit_code = 42; |
252 EXPECT_EQ(base::TERMINATION_STATUS_STILL_RUNNING, | 251 EXPECT_EQ(base::TERMINATION_STATUS_STILL_RUNNING, |
253 base::GetTerminationStatus(process.Handle(), &exit_code)); | 252 base::GetTerminationStatus(process.Handle(), &exit_code)); |
254 EXPECT_EQ(kExpectedStillRunningExitCode, exit_code); | 253 EXPECT_EQ(kExpectedStillRunningExitCode, exit_code); |
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1059 options.current_directory = base::FilePath("/dev/null"); | 1058 options.current_directory = base::FilePath("/dev/null"); |
1060 | 1059 |
1061 base::Process process(SpawnChildWithOptions("SimpleChildProcess", options)); | 1060 base::Process process(SpawnChildWithOptions("SimpleChildProcess", options)); |
1062 ASSERT_TRUE(process.IsValid()); | 1061 ASSERT_TRUE(process.IsValid()); |
1063 | 1062 |
1064 int exit_code = kSuccess; | 1063 int exit_code = kSuccess; |
1065 EXPECT_TRUE(process.WaitForExit(&exit_code)); | 1064 EXPECT_TRUE(process.WaitForExit(&exit_code)); |
1066 EXPECT_NE(kSuccess, exit_code); | 1065 EXPECT_NE(kSuccess, exit_code); |
1067 } | 1066 } |
1068 #endif | 1067 #endif |
OLD | NEW |