Commit f4d21dab authored by Caleb Raitto's avatar Caleb Raitto Committed by Commit Bot

Disable leaking remoting_unittests on LSAN.

See crrev.com/c/1590404 and the linked bug for context -- the goal is to
fix the broken memory-leak checking in Chromium's ASAN
(AddressSanitizer) trybots, which are supposed to also run LSAN
(LeakSanitizer).

Currently-leaking tests must be fixed or disabled before leak checking
can be enabled in the ASAN trybot.

WARNING: This will result in a loss of ASAN coverage for the affected
tests given that LSAN runs as part of the ASAN trybot.

If that's not acceptable, we can wait until the leaks are fixed before
fixing leak detection in trybots, but keep in mind that newly-introduced
leaks Chromium-wide won't be caught until then.

Bug: 961064
Change-Id: I1aa3f6165fdc264b1cfdd7ae20b4fc354495c19a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1639052
Commit-Queue: Caleb Raitto <caraitto@chromium.org>
Reviewed-by: default avatarGary Kacmarcik <garykac@chromium.org>
Cr-Commit-Position: refs/heads/master@{#666319}
parent 87b20413
...@@ -39,6 +39,25 @@ ...@@ -39,6 +39,25 @@
#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
#include "ui/events/event.h" #include "ui/events/event.h"
// TODO(crbug.com/961064): Fix memory leaks in tests and re-enable on LSAN.
#ifdef LEAK_SANITIZER
#define MAYBE_LocalInputTest DISABLED_LocalInputTest
#define MAYBE_ClampMouseEvents DISABLED_ClampMouseEvents
#define MAYBE_DisableInputs DISABLED_DisableInputs
#define MAYBE_MultiMonMouseMove_SameSize DISABLED_MultiMonMouseMove_SameSize
#define MAYBE_RestoreEventState DISABLED_RestoreEventState
#define MAYBE_MultiMonMouseMove DISABLED_MultiMonMouseMove
#define MAYBE_DisconnectOnLocalInputTest DISABLED_DisconnectOnLocalInputTest
#else
#define MAYBE_LocalInputTest LocalInputTest
#define MAYBE_ClampMouseEvents ClampMouseEvents
#define MAYBE_DisableInputs DisableInputs
#define MAYBE_MultiMonMouseMove_SameSize MultiMonMouseMove_SameSize
#define MAYBE_RestoreEventState RestoreEventState
#define MAYBE_MultiMonMouseMove MultiMonMouseMove
#define MAYBE_DisconnectOnLocalInputTest DisconnectOnLocalInputTest
#endif
namespace remoting { namespace remoting {
using protocol::FakeSession; using protocol::FakeSession;
...@@ -413,7 +432,7 @@ void ClientSessionTest::MultiMon_SelectAllDisplays() { ...@@ -413,7 +432,7 @@ void ClientSessionTest::MultiMon_SelectAllDisplays() {
NotifyVideoSizeAll(); NotifyVideoSizeAll();
} }
TEST_F(ClientSessionTest, MultiMonMouseMove) { TEST_F(ClientSessionTest, MAYBE_MultiMonMouseMove) {
CreateClientSession(); CreateClientSession();
ConnectClientSession(); ConnectClientSession();
SetupMultiDisplay(); SetupMultiDisplay();
...@@ -470,7 +489,7 @@ TEST_F(ClientSessionTest, MultiMonMouseMove) { ...@@ -470,7 +489,7 @@ TEST_F(ClientSessionTest, MultiMonMouseMove) {
kDisplay2Height + kDisplay2YOffset - 1)); kDisplay2Height + kDisplay2YOffset - 1));
} }
TEST_F(ClientSessionTest, MultiMonMouseMove_SameSize) { TEST_F(ClientSessionTest, MAYBE_MultiMonMouseMove_SameSize) {
CreateClientSession(); CreateClientSession();
ConnectClientSession(); ConnectClientSession();
SetupMultiDisplay_SameSize(); SetupMultiDisplay_SameSize();
...@@ -526,7 +545,7 @@ TEST_F(ClientSessionTest, MultiMonMouseMove_SameSize) { ...@@ -526,7 +545,7 @@ TEST_F(ClientSessionTest, MultiMonMouseMove_SameSize) {
kDisplay1Height + kDisplay2YOffset - 1)); kDisplay1Height + kDisplay2YOffset - 1));
} }
TEST_F(ClientSessionTest, DisableInputs) { TEST_F(ClientSessionTest, MAYBE_DisableInputs) {
CreateClientSession(); CreateClientSession();
ConnectClientSession(); ConnectClientSession();
SetupSingleDisplay(); SetupSingleDisplay();
...@@ -582,7 +601,7 @@ TEST_F(ClientSessionTest, DisableInputs) { ...@@ -582,7 +601,7 @@ TEST_F(ClientSessionTest, DisableInputs) {
EqualsClipboardEvent(kMimeTypeTextUtf8, "c")); EqualsClipboardEvent(kMimeTypeTextUtf8, "c"));
} }
TEST_F(ClientSessionTest, LocalInputTest) { TEST_F(ClientSessionTest, MAYBE_LocalInputTest) {
CreateClientSession(); CreateClientSession();
ConnectClientSession(); ConnectClientSession();
SetupSingleDisplay(); SetupSingleDisplay();
...@@ -622,7 +641,7 @@ TEST_F(ClientSessionTest, LocalInputTest) { ...@@ -622,7 +641,7 @@ TEST_F(ClientSessionTest, LocalInputTest) {
// eventually (via dependency injection, not sleep!) // eventually (via dependency injection, not sleep!)
} }
TEST_F(ClientSessionTest, DisconnectOnLocalInputTest) { TEST_F(ClientSessionTest, MAYBE_DisconnectOnLocalInputTest) {
desktop_environment_options_.set_terminate_upon_input(true); desktop_environment_options_.set_terminate_upon_input(true);
CreateClientSession(); CreateClientSession();
ConnectClientSession(); ConnectClientSession();
...@@ -633,7 +652,7 @@ TEST_F(ClientSessionTest, DisconnectOnLocalInputTest) { ...@@ -633,7 +652,7 @@ TEST_F(ClientSessionTest, DisconnectOnLocalInputTest) {
EXPECT_FALSE(connection_->is_connected()); EXPECT_FALSE(connection_->is_connected());
} }
TEST_F(ClientSessionTest, RestoreEventState) { TEST_F(ClientSessionTest, MAYBE_RestoreEventState) {
CreateClientSession(); CreateClientSession();
ConnectClientSession(); ConnectClientSession();
SetupSingleDisplay(); SetupSingleDisplay();
...@@ -671,7 +690,7 @@ TEST_F(ClientSessionTest, RestoreEventState) { ...@@ -671,7 +690,7 @@ TEST_F(ClientSessionTest, RestoreEventState) {
EXPECT_THAT(key_events[3], EqualsKeyEvent(2, false)); EXPECT_THAT(key_events[3], EqualsKeyEvent(2, false));
} }
TEST_F(ClientSessionTest, ClampMouseEvents) { TEST_F(ClientSessionTest, MAYBE_ClampMouseEvents) {
CreateClientSession(); CreateClientSession();
ConnectClientSession(); ConnectClientSession();
SetupSingleDisplay(); SetupSingleDisplay();
......
...@@ -7,6 +7,28 @@ ...@@ -7,6 +7,28 @@
#include "base/location.h" #include "base/location.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
// TODO(crbug.com/961064): Fix memory leaks in tests and re-enable on LSAN.
#ifdef LEAK_SANITIZER
#define MAYBE_SingleDisplay DISABLED_SingleDisplay
#define MAYBE_DualDisplayRight_ReverseOrder \
DISABLED_DualDisplayRight_ReverseOrder
#define MAYBE_DualDisplayLeft_ReverseOrder DISABLED_DualDisplayLeft_ReverseOrder
#define MAYBE_DualDisplayRight DISABLED_DualDisplayRight
#define MAYBE_DualDisplayLeft DISABLED_DualDisplayLeft
#define MAYBE_Multimon3 DISABLED_Multimon3
#define MAYBE_TripleDisplayMiddle DISABLED_TripleDisplayMiddle
#define MAYBE_Multimon7 DISABLED_Multimon7
#else
#define MAYBE_SingleDisplay SingleDisplay
#define MAYBE_DualDisplayRight_ReverseOrder DualDisplayRight_ReverseOrder
#define MAYBE_DualDisplayLeft_ReverseOrder DualDisplayLeft_ReverseOrder
#define MAYBE_DualDisplayRight DualDisplayRight
#define MAYBE_DualDisplayLeft DualDisplayLeft
#define MAYBE_Multimon3 Multimon3
#define MAYBE_TripleDisplayMiddle TripleDisplayMiddle
#define MAYBE_Multimon7 Multimon7
#endif
namespace remoting { namespace remoting {
class DesktopDisplayInfoTest : public testing::Test { class DesktopDisplayInfoTest : public testing::Test {
...@@ -41,7 +63,7 @@ class DesktopDisplayInfoTest : public testing::Test { ...@@ -41,7 +63,7 @@ class DesktopDisplayInfoTest : public testing::Test {
// | 300x200 | // | 300x200 |
// +---------+ // +---------+
// o = desktop origin // o = desktop origin
TEST_F(DesktopDisplayInfoTest, SingleDisplay) { TEST_F(DesktopDisplayInfoTest, MAYBE_SingleDisplay) {
AddDisplay(0, 0, 300, 200); AddDisplay(0, 0, 300, 200);
VerifyDisplayOffset(FROM_HERE, 0, 0, 0); VerifyDisplayOffset(FROM_HERE, 0, 0, 0);
...@@ -52,7 +74,7 @@ TEST_F(DesktopDisplayInfoTest, SingleDisplay) { ...@@ -52,7 +74,7 @@ TEST_F(DesktopDisplayInfoTest, SingleDisplay) {
// | 300x200 | 500x400 | // | 300x200 | 500x400 |
// +---------+ | // +---------+ |
// +------------+ // +------------+
TEST_F(DesktopDisplayInfoTest, DualDisplayRight) { TEST_F(DesktopDisplayInfoTest, MAYBE_DualDisplayRight) {
AddDisplay(0, 0, 300, 200); AddDisplay(0, 0, 300, 200);
AddDisplay(300, 0, 500, 400); AddDisplay(300, 0, 500, 400);
...@@ -65,7 +87,7 @@ TEST_F(DesktopDisplayInfoTest, DualDisplayRight) { ...@@ -65,7 +87,7 @@ TEST_F(DesktopDisplayInfoTest, DualDisplayRight) {
// | 300x200 | 500x400 | // | 300x200 | 500x400 |
// +---------+ | // +---------+ |
// +------------+ // +------------+
TEST_F(DesktopDisplayInfoTest, DualDisplayRight_ReverseOrder) { TEST_F(DesktopDisplayInfoTest, MAYBE_DualDisplayRight_ReverseOrder) {
AddDisplay(300, 0, 500, 400); AddDisplay(300, 0, 500, 400);
AddDisplay(0, 0, 300, 200); AddDisplay(0, 0, 300, 200);
...@@ -78,7 +100,7 @@ TEST_F(DesktopDisplayInfoTest, DualDisplayRight_ReverseOrder) { ...@@ -78,7 +100,7 @@ TEST_F(DesktopDisplayInfoTest, DualDisplayRight_ReverseOrder) {
// | 300x200 | 500x400 | // | 300x200 | 500x400 |
// +---------+ | // +---------+ |
// +------------+ // +------------+
TEST_F(DesktopDisplayInfoTest, DualDisplayLeft) { TEST_F(DesktopDisplayInfoTest, MAYBE_DualDisplayLeft) {
AddDisplay(0, 0, 500, 400); AddDisplay(0, 0, 500, 400);
AddDisplay(-300, 0, 300, 200); AddDisplay(-300, 0, 300, 200);
...@@ -91,7 +113,7 @@ TEST_F(DesktopDisplayInfoTest, DualDisplayLeft) { ...@@ -91,7 +113,7 @@ TEST_F(DesktopDisplayInfoTest, DualDisplayLeft) {
// | 300x200 | 500x400 | // | 300x200 | 500x400 |
// +---------+ | // +---------+ |
// +------------+ // +------------+
TEST_F(DesktopDisplayInfoTest, DualDisplayLeft_ReverseOrder) { TEST_F(DesktopDisplayInfoTest, MAYBE_DualDisplayLeft_ReverseOrder) {
AddDisplay(-300, 0, 300, 200); AddDisplay(-300, 0, 300, 200);
AddDisplay(0, 0, 500, 400); AddDisplay(0, 0, 500, 400);
...@@ -104,7 +126,7 @@ TEST_F(DesktopDisplayInfoTest, DualDisplayLeft_ReverseOrder) { ...@@ -104,7 +126,7 @@ TEST_F(DesktopDisplayInfoTest, DualDisplayLeft_ReverseOrder) {
// | 300x200 | 500x400 | 2 | // | 300x200 | 500x400 | 2 |
// +---------+ | 400x350 | // +---------+ | 400x350 |
// +------------+---------+ // +------------+---------+
TEST_F(DesktopDisplayInfoTest, TripleDisplayMiddle) { TEST_F(DesktopDisplayInfoTest, MAYBE_TripleDisplayMiddle) {
AddDisplay(-300, 0, 300, 200); AddDisplay(-300, 0, 300, 200);
AddDisplay(0, 0, 500, 400); // Default display. AddDisplay(0, 0, 500, 400); // Default display.
AddDisplay(500, 50, 400, 350); AddDisplay(500, 50, 400, 350);
...@@ -123,7 +145,7 @@ TEST_F(DesktopDisplayInfoTest, TripleDisplayMiddle) { ...@@ -123,7 +145,7 @@ TEST_F(DesktopDisplayInfoTest, TripleDisplayMiddle) {
// +-----------+ - 950 // +-----------+ - 950
// | | | | | // | | | | |
// -300 0 300 500 900 // -300 0 300 500 900
TEST_F(DesktopDisplayInfoTest, Multimon3) { TEST_F(DesktopDisplayInfoTest, MAYBE_Multimon3) {
AddDisplay(0, 0, 500, 400); // Default display. AddDisplay(0, 0, 500, 400); // Default display.
AddDisplay(300, 400, 600, 450); AddDisplay(300, 400, 600, 450);
AddDisplay(-300, 350, 300, 200); AddDisplay(-300, 350, 300, 200);
...@@ -150,7 +172,7 @@ TEST_F(DesktopDisplayInfoTest, Multimon3) { ...@@ -150,7 +172,7 @@ TEST_F(DesktopDisplayInfoTest, Multimon3) {
// - - 0 6 7 8 1 1 1 1 // - - 0 6 7 8 1 1 1 1
// 7 4 0 0 0 2 3 5 9 // 7 4 0 0 0 2 3 5 9
// 0 0 0 5 0 0 // 0 0 0 5 0 0
TEST_F(DesktopDisplayInfoTest, Multimon7) { TEST_F(DesktopDisplayInfoTest, MAYBE_Multimon7) {
AddDisplay(80, -10, 70, 60); AddDisplay(80, -10, 70, 60);
AddDisplay(60, -50, 60, 40); AddDisplay(60, -50, 60, 40);
AddDisplay(-70, 40, 30, 60); AddDisplay(-70, 40, 30, 60);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment