Closed Bug 1222944 Opened 9 years ago Closed 8 years ago

[mozrunner] Dump kernel log for B2G emulator

Categories

(Testing :: Mozbase, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: edgar, Unassigned)

References

Details

Attachments

(3 obsolete files)

Kernel log is helpful when debugging some test failure which is caused by emulator environment, like Bug 1202310 comment 4. It will be very handy if we could dump it when running emulator tests.
I already have a WIP patch, will attach it later.
Attached patch WIP, Patch, v1 (obsolete) — Splinter Review
Attached patch WIP, Patch, v2 (obsolete) — Splinter Review
Attachment #8684862 - Attachment is obsolete: true
Attachment #8685942 - Attachment is obsolete: true
Comment on attachment 8698780 [details]
MozReview Request: Bug 1222944 - [mozrunner] Dump kernel log for B2G emulator

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/28113/diff/1-2/
Attachment #8698780 - Flags: review?(ahalberstadt)
Comment on attachment 8698780 [details]
MozReview Request: Bug 1222944 - [mozrunner] Dump kernel log for B2G emulator

https://reviewboard.mozilla.org/r/28113/#review25309

This looks great! Just one issue below.

::: testing/mozbase/mozrunner/mozrunner/devices/base.py:148
(Diff revision 1)
> +            #save kernel log

nit: space after #

::: testing/mozbase/mozrunner/mozrunner/devices/base.py:152
(Diff revision 1)
> +            kmsg_args = [self.app_ctx.adb, '-s', '%s' % serial,
> +                         'shell', 'cat', '/proc/kmsg']

'cat' will just return right away and miss all the following output from the actual job. I think you want to use 'tail -f /proc/kmsg' instead. If you want the full file dumped from the very beginning you can use 'tail -f -n +0 /proc/kmsg' (assuming the tail binary on the emulator exists and is the same as the one on my linux machine).
Attachment #8698780 - Flags: review?(ahalberstadt)
https://reviewboard.mozilla.org/r/28113/#review25309

> 'cat' will just return right away and miss all the following output from the actual job. I think you want to use 'tail -f /proc/kmsg' instead. If you want the full file dumped from the very beginning you can use 'tail -f -n +0 /proc/kmsg' (assuming the tail binary on the emulator exists and is the same as the one on my linux machine).

Just tested, 'tail' doesn't exist by default, but comes with busybox.. So I guess we either need to come up with an equivalent to 'tail -f' or add a check to only save the kernel log if busybox is installed.
(In reply to Andrew Halberstadt [:ahal] from comment #8)
> https://reviewboard.mozilla.org/r/28113/#review25309
> 
> > 'cat' will just return right away and miss all the following output from the actual job. I think you want to use 'tail -f /proc/kmsg' instead. If you want the full file dumped from the very beginning you can use 'tail -f -n +0 /proc/kmsg' (assuming the tail binary on the emulator exists and is the same as the one on my linux machine).
> 
> Just tested, 'tail' doesn't exist by default, but comes with busybox.. So I
> guess we either need to come up with an equivalent to 'tail -f' or add a
> check to only save the kernel log if busybox is installed.

Thanks for your comment, will address this in next version.
Assignee: nobody → echen
Depends on: 1235734
Priority: -- → P3
No longer work on this.
Assignee: echen → nobody
I don't think we are going to move this on due to the latest B2G announcement.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Attachment #8698780 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: