Open Bug 1532654 Opened 7 months ago Updated 5 months ago

Teach the jit-test harness about the Android log

Categories

(Core :: JavaScript Engine: JIT, enhancement, P2)

67 Branch
All
Android
enhancement

Tracking

()

mozilla67
Tracking Status
firefox67 --- affected

People

(Reporter: sstangl, Assigned: sstangl)

References

(Blocks 1 open bug)

Details

Attachments

(2 obsolete files)

This is follow-up work to Bug 1529034, which diagnosed a failing jit-test on Android AArch64 caused by the test harness.

The issue is that every platform except for Android outputs error messages to stderr, while Android outputs error messages to the system log (which functions like systemd's journald). The jit-test harness reads from stderr to determine whether certain classes of expected crashes occurred. Because it never sees any messages on stderr, the harness marks expected crashes as unexpected.

I attempted to solve this by changing Android to output to stderr in addition to the log, but that solution was rejected. So the next solution is to teach the jit-test harness to spawn a subprocess for each test that executes logcat and greps the log for the specific test it was executing.

This solution is obviously error-prone, in particular because:

  1. The tests are run in parallel.
  2. The log is serial and system-wide.

In addition, note that launching a subprocess to read the log is slow, and Android is already a particularly slow system.

In Bug 1529034, rather than deal with all this as a blocker for turning on ARM64 Ion, we opted to disable the test auto-regress/bug1263857.js. This fix allows that test to be re-enabled on ARM64.

Blocks: 1545537

Gecko and MFBT policy is to send assertion failure reports to the
Android system log. This means we can't access the assertion reason from
the jit-test test harness. Tests that allow or expect certain types of
uncachable errors (such as unhandlable-oom) are unable to separate this
allowed error from other errors.

This patch shadows the definition of the android log APIs in the jsshell
so they are redirected to stderr to match other platforms.

I implement the hack that :glandium proposed of simply shadowing the android log commands. This feels like the most reasonable option to have consistent behaviour in the shell across platforms. If Gecko ever changes it's stance on android logging, we can change this hack then.

Attachment #9060693 - Attachment is obsolete: true
Attachment #9060694 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.