crash_reporter: clarify chrome crash ignore message
We ignore Chrome crashes when it is the kernel that runs us. When Chrome itself runs us, we will take their crashes. The log output here though has long confused developers, so rephrase it slightly. BUG=None TEST=`cros_run_unit_tests -p crash-reporter --board x86-alex` passes TEST=`cbuildbot {amd64,x86}-generic-full` passes (VMTests) Change-Id: Ia13a766134f5a20a1cc4eaab74ac46633d3177eb Reviewed-on: https://chromium-review.googlesource.com/172261 Reviewed-by: Chris Masone <cmasone@chromium.org> Commit-Queue: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
parent
d9cd84277f
commit
d2db5ff988
2 changed files with 16 additions and 10 deletions
|
@ -584,7 +584,8 @@ bool UserCollector::ShouldDump(bool has_owner_consent,
|
|||
// crashes towards user crashes, so user crashes really mean non-Chrome
|
||||
// user-space crashes.
|
||||
if (!handle_chrome_crashes && IsChromeExecName(exec)) {
|
||||
*reason = "ignoring - chrome crash";
|
||||
*reason = "ignoring call by kernel - chrome crash; "
|
||||
"waiting for chrome to call us directly";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,11 @@ static bool s_metrics = false;
|
|||
|
||||
static const char kFilePath[] = "/my/path";
|
||||
|
||||
// Keep in sync with UserCollector::ShouldDump.
|
||||
static const char kChromeIgnoreMsg[] =
|
||||
"ignoring call by kernel - chrome crash; "
|
||||
"waiting for chrome to call us directly";
|
||||
|
||||
using base::FilePath;
|
||||
using chromeos::FindLog;
|
||||
|
||||
|
@ -159,25 +164,25 @@ TEST_F(UserCollectorTest, ShouldDumpChromeOverridesDeveloperImage) {
|
|||
// When running a crash test, behave as normal.
|
||||
EXPECT_FALSE(collector_.ShouldDump(false, false, false,
|
||||
"chrome", &reason));
|
||||
EXPECT_EQ("ignoring - chrome crash", reason);
|
||||
EXPECT_EQ(kChromeIgnoreMsg, reason);
|
||||
EXPECT_FALSE(collector_.ShouldDump(false, false, false,
|
||||
"supplied_Compositor", &reason));
|
||||
EXPECT_EQ("ignoring - chrome crash", reason);
|
||||
EXPECT_EQ(kChromeIgnoreMsg, reason);
|
||||
EXPECT_FALSE(collector_.ShouldDump(false, false, false,
|
||||
"supplied_PipelineThread", &reason));
|
||||
EXPECT_EQ("ignoring - chrome crash", reason);
|
||||
EXPECT_EQ(kChromeIgnoreMsg, reason);
|
||||
EXPECT_FALSE(collector_.ShouldDump(false, false, false,
|
||||
"Chrome_ChildIOThread", &reason));
|
||||
EXPECT_EQ("ignoring - chrome crash", reason);
|
||||
EXPECT_EQ(kChromeIgnoreMsg, reason);
|
||||
EXPECT_FALSE(collector_.ShouldDump(false, false, false,
|
||||
"supplied_Chrome_ChildIOT", &reason));
|
||||
EXPECT_EQ("ignoring - chrome crash", reason);
|
||||
EXPECT_EQ(kChromeIgnoreMsg, reason);
|
||||
EXPECT_FALSE(collector_.ShouldDump(false, false, false,
|
||||
"supplied_ChromotingClien", &reason));
|
||||
EXPECT_EQ("ignoring - chrome crash", reason);
|
||||
EXPECT_EQ(kChromeIgnoreMsg, reason);
|
||||
EXPECT_FALSE(collector_.ShouldDump(false, false, false,
|
||||
"supplied_LocalInputMonit", &reason));
|
||||
EXPECT_EQ("ignoring - chrome crash", reason);
|
||||
EXPECT_EQ(kChromeIgnoreMsg, reason);
|
||||
|
||||
// When running a developer image, test that chrome crashes are handled
|
||||
// when the "handle_chrome_crashes" flag is set.
|
||||
|
@ -243,7 +248,7 @@ TEST_F(UserCollectorTest, HandleChromeCrashWithConsent) {
|
|||
collector_.HandleCrash("5:2:ignored", "chrome");
|
||||
EXPECT_TRUE(FindLog(
|
||||
"Received crash notification for chrome[5] sig 2"));
|
||||
EXPECT_TRUE(FindLog("(ignoring - chrome crash)"));
|
||||
EXPECT_TRUE(FindLog(kChromeIgnoreMsg));
|
||||
ASSERT_EQ(s_crashes, 0);
|
||||
}
|
||||
|
||||
|
@ -252,7 +257,7 @@ TEST_F(UserCollectorTest, HandleSuppliedChromeCrashWithConsent) {
|
|||
collector_.HandleCrash("0:2:chrome", NULL);
|
||||
EXPECT_TRUE(FindLog(
|
||||
"Received crash notification for supplied_chrome[0] sig 2"));
|
||||
EXPECT_TRUE(FindLog("(ignoring - chrome crash)"));
|
||||
EXPECT_TRUE(FindLog(kChromeIgnoreMsg));
|
||||
ASSERT_EQ(s_crashes, 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue