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("wibble\n", TestLaunchProcess(echo_base_test, env_changes, | 687 EXPECT_EQ( |
688 no_clear_environ, CLONE_FS)); | 688 "wibble\n", |
| 689 TestLaunchProcess( |
| 690 echo_base_test, env_changes, no_clear_environ, CLONE_FS | SIGCHLD)); |
689 } | 691 } |
690 | 692 |
691 EXPECT_EQ( | 693 EXPECT_EQ( |
692 "BASE_TEST=wibble\n", | 694 "BASE_TEST=wibble\n", |
693 TestLaunchProcess( | 695 TestLaunchProcess( |
694 print_env, env_changes, true /* clear_environ */, no_clone_flags)); | 696 print_env, env_changes, true /* clear_environ */, no_clone_flags)); |
695 env_changes.clear(); | 697 env_changes.clear(); |
696 EXPECT_EQ( | 698 EXPECT_EQ( |
697 "", | 699 "", |
698 TestLaunchProcess( | 700 TestLaunchProcess( |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
912 | 914 |
913 // Check that process was really killed. | 915 // Check that process was really killed. |
914 EXPECT_TRUE(IsProcessDead(child_process.Handle())); | 916 EXPECT_TRUE(IsProcessDead(child_process.Handle())); |
915 } | 917 } |
916 | 918 |
917 MULTIPROCESS_TEST_MAIN(process_util_test_die_immediately) { | 919 MULTIPROCESS_TEST_MAIN(process_util_test_die_immediately) { |
918 return 0; | 920 return 0; |
919 } | 921 } |
920 | 922 |
921 #endif // defined(OS_POSIX) | 923 #endif // defined(OS_POSIX) |
OLD | NEW |