Commit ca2591d9 authored by Hans Wennborg's avatar Hans Wennborg Committed by Commit Bot

sandbox_linux_unittests: Relax death test output expectation under LSan

After upstream change r334036, LSan started printing a warning to stdout,
breaking the test expectations.

Bug: 850867
Change-Id: I9a5857a3175f7520ffe448f41fb260d5722c62d4
Reviewed-on: https://chromium-review.googlesource.com/1092740
Commit-Queue: Hans Wennborg <hans@chromium.org>
Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565674}
parent a0c4aeac
......@@ -252,8 +252,11 @@ void UnitTests::DeathSuccess(int status, const std::string& msg, const void*) {
ASSERT_TRUE(subprocess_terminated_normally) << details;
int subprocess_exit_status = WEXITSTATUS(status);
ASSERT_EQ(kExpectedValue, subprocess_exit_status) << details;
#if !defined(LEAK_SANITIZER)
// LSan may print warnings to stdout, breaking this expectation.
bool subprocess_exited_but_printed_messages = !msg.empty();
EXPECT_FALSE(subprocess_exited_but_printed_messages) << details;
#endif
}
void UnitTests::DeathSuccessAllowNoise(int status,
......
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