Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Side by Side Diff: base/process/process_util_unittest.cc

Issue 24742002: Disable ProcessUtilTest.GetAppOutputRestrictedNoZombies under ASan on 64-bit OS X (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 EXPECT_TRUE(base::GetAppOutputRestricted(CommandLine(argv), &output, 10)); 762 EXPECT_TRUE(base::GetAppOutputRestricted(CommandLine(argv), &output, 10));
763 EXPECT_STREQ("1234567890", output.c_str()); 763 EXPECT_STREQ("1234567890", output.c_str());
764 #else 764 #else
765 argv.push_back("yes"); 765 argv.push_back("yes");
766 EXPECT_TRUE(base::GetAppOutputRestricted(CommandLine(argv), &output, 10)); 766 EXPECT_TRUE(base::GetAppOutputRestricted(CommandLine(argv), &output, 10));
767 EXPECT_STREQ("y\ny\ny\ny\ny\n", output.c_str()); 767 EXPECT_STREQ("y\ny\ny\ny\ny\n", output.c_str());
768 #endif 768 #endif
769 } 769 }
770 #endif 770 #endif
771 771
772 TEST_F(ProcessUtilTest, GetAppOutputRestrictedNoZombies) { 772 #if defined(ADDRESS_SANITIZER) && defined(OS_MACOSX) && \
773 defined(ARCH_CPU_64_BITS)
774 // Times out under AddressSanitizer on 64-bit OS X, see
775 // http://crbug.com/298197.
776 #define MAYBE_GetAppOutputRestrictedNoZombies \
777 DISABLED_GetAppOutputRestrictedNoZombies
778 #else
779 #define MAYBE_GetAppOutputRestrictedNoZombies GetAppOutputRestrictedNoZombies
780 #endif
781 TEST_F(ProcessUtilTest, MAYBE_GetAppOutputRestrictedNoZombies) {
773 std::vector<std::string> argv; 782 std::vector<std::string> argv;
774 783
775 argv.push_back(std::string(kShellPath)); // argv[0] 784 argv.push_back(std::string(kShellPath)); // argv[0]
776 argv.push_back("-c"); // argv[1] 785 argv.push_back("-c"); // argv[1]
777 argv.push_back("echo 123456789012345678901234567890"); // argv[2] 786 argv.push_back("echo 123456789012345678901234567890"); // argv[2]
778 787
779 // Run |GetAppOutputRestricted()| 300 (> default per-user processes on Mac OS 788 // Run |GetAppOutputRestricted()| 300 (> default per-user processes on Mac OS
780 // 10.5) times with an output buffer big enough to capture all output. 789 // 10.5) times with an output buffer big enough to capture all output.
781 for (int i = 0; i < 300; i++) { 790 for (int i = 0; i < 300; i++) {
782 std::string output; 791 std::string output;
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 // Check that process was really killed. 912 // Check that process was really killed.
904 EXPECT_TRUE(IsProcessDead(child_process)); 913 EXPECT_TRUE(IsProcessDead(child_process));
905 base::CloseProcessHandle(child_process); 914 base::CloseProcessHandle(child_process);
906 } 915 }
907 916
908 MULTIPROCESS_TEST_MAIN(process_util_test_die_immediately) { 917 MULTIPROCESS_TEST_MAIN(process_util_test_die_immediately) {
909 return 0; 918 return 0;
910 } 919 }
911 920
912 #endif // defined(OS_POSIX) 921 #endif // defined(OS_POSIX)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698