| 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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 | 677 |
| 678 env_changes[kBaseTest] = "wibble"; | 678 env_changes[kBaseTest] = "wibble"; |
| 679 EXPECT_EQ("wibble\n", | 679 EXPECT_EQ("wibble\n", |
| 680 TestLaunchProcess( | 680 TestLaunchProcess( |
| 681 echo_base_test, env_changes, no_clear_environ, no_clone_flags)); | 681 echo_base_test, env_changes, no_clear_environ, no_clone_flags)); |
| 682 | 682 |
| 683 #if defined(OS_LINUX) | 683 #if defined(OS_LINUX) |
| 684 // Test a non-trival value for clone_flags. | 684 // Test a non-trival value for clone_flags. |
| 685 // Don't test on Valgrind as it has limited support for clone(). | 685 // Don't test on Valgrind as it has limited support for clone(). |
| 686 if (!RunningOnValgrind()) { | 686 if (!RunningOnValgrind()) { |
| 687 EXPECT_EQ( | 687 EXPECT_EQ("wibble\n", TestLaunchProcess(echo_base_test, env_changes, |
| 688 "wibble\n", | 688 no_clear_environ, CLONE_FS)); |
| 689 TestLaunchProcess( | |
| 690 echo_base_test, env_changes, no_clear_environ, CLONE_FS | SIGCHLD)); | |
| 691 } | 689 } |
| 692 | 690 |
| 693 EXPECT_EQ( | 691 EXPECT_EQ( |
| 694 "BASE_TEST=wibble\n", | 692 "BASE_TEST=wibble\n", |
| 695 TestLaunchProcess( | 693 TestLaunchProcess( |
| 696 print_env, env_changes, true /* clear_environ */, no_clone_flags)); | 694 print_env, env_changes, true /* clear_environ */, no_clone_flags)); |
| 697 env_changes.clear(); | 695 env_changes.clear(); |
| 698 EXPECT_EQ( | 696 EXPECT_EQ( |
| 699 "", | 697 "", |
| 700 TestLaunchProcess( | 698 TestLaunchProcess( |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 914 | 912 |
| 915 // Check that process was really killed. | 913 // Check that process was really killed. |
| 916 EXPECT_TRUE(IsProcessDead(child_process.Handle())); | 914 EXPECT_TRUE(IsProcessDead(child_process.Handle())); |
| 917 } | 915 } |
| 918 | 916 |
| 919 MULTIPROCESS_TEST_MAIN(process_util_test_die_immediately) { | 917 MULTIPROCESS_TEST_MAIN(process_util_test_die_immediately) { |
| 920 return 0; | 918 return 0; |
| 921 } | 919 } |
| 922 | 920 |
| 923 #endif // defined(OS_POSIX) | 921 #endif // defined(OS_POSIX) |
| OLD | NEW |