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

Side by Side Diff: sandbox/linux/syscall_broker/broker_process_unittest.cc

Issue 1824593002: Disabling flaky RecvMsgDescriptorLeak (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« 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 #include "sandbox/linux/syscall_broker/broker_process.h" 5 #include "sandbox/linux/syscall_broker/broker_process.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <poll.h> 9 #include <poll.h>
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 // Don't do anything here, so that ASSERT works in the subfunction as 482 // Don't do anything here, so that ASSERT works in the subfunction as
483 // expected. 483 // expected.
484 } 484 }
485 485
486 TEST(BrokerProcess, OpenComplexFlagsNoClientCheck) { 486 TEST(BrokerProcess, OpenComplexFlagsNoClientCheck) {
487 TestOpenComplexFlags(false /* fast_check_in_client */); 487 TestOpenComplexFlags(false /* fast_check_in_client */);
488 // Don't do anything here, so that ASSERT works in the subfunction as 488 // Don't do anything here, so that ASSERT works in the subfunction as
489 // expected. 489 // expected.
490 } 490 }
491 491
492 #if defined(OS_LINUX)
mdempsky 2016/03/24 22:27:30 The entire sandbox/linux directory is OS_LINUX-spe
493 // Flaky on Linux NG bots: https://crbug.com/595199.
494 #define MAYBE_RecvMsgDescriptorLeak DISABLED_RecvMsgDescriptorLeak
495 #else
496 #define MAYBE_RecvMsgDescriptorLeak RecvMsgDescriptorLeak
497 #endif
498
492 // We need to allow noise because the broker will log when it receives our 499 // We need to allow noise because the broker will log when it receives our
493 // bogus IPCs. 500 // bogus IPCs.
494 SANDBOX_TEST_ALLOW_NOISE(BrokerProcess, RecvMsgDescriptorLeak) { 501 SANDBOX_TEST_ALLOW_NOISE(BrokerProcess, MAYBE_RecvMsgDescriptorLeak) {
495 // Android creates a socket on first use of the LOG call. 502 // Android creates a socket on first use of the LOG call.
496 // We need to ensure this socket is open before we 503 // We need to ensure this socket is open before we
497 // begin the test. 504 // begin the test.
498 LOG(INFO) << "Ensure Android LOG socket is allocated"; 505 LOG(INFO) << "Ensure Android LOG socket is allocated";
499 506
500 // Find the four lowest available file descriptors. 507 // Find the four lowest available file descriptors.
501 int available_fds[4]; 508 int available_fds[4];
502 SANDBOX_ASSERT(0 == pipe(available_fds)); 509 SANDBOX_ASSERT(0 == pipe(available_fds));
503 SANDBOX_ASSERT(0 == pipe(available_fds + 2)); 510 SANDBOX_ASSERT(0 == pipe(available_fds + 2));
504 511
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 ssize_t len = HANDLE_EINTR(read(fd_check, buf, sizeof(buf))); 656 ssize_t len = HANDLE_EINTR(read(fd_check, buf, sizeof(buf)));
650 657
651 ASSERT_EQ(len, static_cast<ssize_t>(sizeof(kTestText))); 658 ASSERT_EQ(len, static_cast<ssize_t>(sizeof(kTestText)));
652 ASSERT_EQ(memcmp(kTestText, buf, sizeof(kTestText)), 0); 659 ASSERT_EQ(memcmp(kTestText, buf, sizeof(kTestText)), 0);
653 } 660 }
654 } 661 }
655 662
656 } // namespace syscall_broker 663 } // namespace syscall_broker
657 664
658 } // namespace sandbox 665 } // namespace sandbox
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