Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse tombstones on android devices #27815

Merged
merged 3 commits into from Mar 1, 2021
Merged

Parse tombstones on android devices #27815

merged 3 commits into from Mar 1, 2021

Conversation

WeizhongX
Copy link
Contributor

Added parameter to allow wrapper to pass in a tombstone
parser script, and parse any tombstones at end of each test,
and save result to result viewer

Tested with /font-access, tombstone is passed and saved

Added parameter to allow wrappter to pass in a tombstone
parser script, and parse any tombstones at end of each test,
and save result to result viewer

Tested with /font-access, tombstone is passed and saved
@wpt-pr-bot wpt-pr-bot added infra wptrunner The automated test runner, commonly called through ./wpt run labels Feb 27, 2021
tools/wptrunner/wptrunner/browsers/chrome_android.py Outdated Show resolved Hide resolved
tools/wptrunner/wptrunner/testrunner.py Outdated Show resolved Hide resolved
@LukeZielinski LukeZielinski merged commit 6376465 into master Mar 1, 2021
@LukeZielinski LukeZielinski deleted the push_tombstone branch March 1, 2021 20:49
Copy link
Contributor

@jgraham jgraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the late review but I think I agree with @stephenmcgruer that we could make this patch reuse some of the existing infrastructure rather than being its own thing.

@@ -615,6 +615,9 @@ def test_ended(self, test, results):
return
if self.timer is not None:
self.timer.cancel()

self.browser.browser.maybe_parse_tombstone()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is basically checking for crashes?

I wonder why it couldn't be part of browser.check_crash in that case? There's already logic below (line 661) to handle this; it might be enough just to have the android browsers implement that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just to parse any new tombstones on the Android device. I want to keep this separate to check_crash, or log_crash, because tombstones could come from unrelated processes. Currently there is no reliable way (yet) to know which process ids are for the browser under test. At design stage, I planned to filter tombstones against process name. Turned out this may not work, due to 1) process name may change e.g. when package name changes, 2) sometimes a tombstone file could have multiple tombstones.

I actually checked check_crash when I was implementing this. Looks like it will touch test status, which is what I don't want to.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It only actually does this for crashtests at the moment, because it was causing problems to unconditionally set the status to crash when a dump file was found. And you could always return False unconditionally if you never want the harness to react as if a crash has been found.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me give this a try, thanks!

tools/wptrunner/wptrunner/wptcommandline.py Show resolved Hide resolved
cmd.extend(["--output-directory", self.output_directory])
raw_output = subprocess.check_output(cmd)
for line in raw_output.splitlines():
logger.process_output("TRACE", line, "logcat")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we actually find a crash can we call logger.log_crash so it is logged as a crash?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I would say this is similar to the discussion for check_crash at above, and let's don't do this yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra wptrunner The automated test runner, commonly called through ./wpt run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants