Closed
Bug 1245900
Opened 9 years ago
Closed 7 years ago
Autophone - adb_android.py - improve is_device_ready
Categories
(Testing Graveyard :: Autophone, defect)
Testing Graveyard
Autophone
Tracking
(firefox47 affected)
RESOLVED
WONTFIX
Tracking | Status | |
---|---|---|
firefox47 | --- | affected |
People
(Reporter: bc, Assigned: bc)
References
Details
Attachments
(4 files)
1.54 KB,
text/plain
|
Details | |
5.95 KB,
patch
|
jmaher
:
review-
|
Details | Diff | Splinter Review |
4.28 KB,
patch
|
jmaher
:
review+
|
Details | Diff | Splinter Review |
5.56 KB,
patch
|
jmaher
:
review+
|
Details | Diff | Splinter Review |
I believe I can use a combination of init.svc.bootanim, sys.boot_completed, dev.bootcomplete properties to improve the reliability of the detection when I device is ready for testing. I believe this will help reduce wait times after fennec installations and other reboots. I'll develop this against Autophone's adb*.py, but will be porting it to mozdevice's before long.
Assignee | ||
Comment 1•9 years ago
|
||
I ran two tests. "Before" was master without any changes to is_device_ready while "After" is with the changes to is_device_ready in adb_android.py that I will attach in a moment.
There was approximately a 2% improvement in job times for the Samsung Galaxy S III and perhaps 2.5% improvement for Nexus 6P. The Nexus Ones showed no real change.
You can see that nexus-6p-5 is much slower than its counterparts. I'll try to investigate and possibly reflash it to factory and re-root it to see if this can be fixed.
Assignee | ||
Comment 2•9 years ago
|
||
PS. The "After" test was with
device_ready_retry_attempts = 12
device_ready_retry_wait = 15
which would check slightly more often than the default of
device_ready_retry_attempts = 3
device_ready_retry_wait = 20
Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8716451 -
Flags: review?(jmaher)
Assignee | ||
Comment 4•9 years ago
|
||
Attachment #8716452 -
Flags: review?(jmaher)
Comment 5•9 years ago
|
||
Comment on attachment 8716451 [details] [diff] [review]
bug-1245900-adb_android-v1.patch
Review of attachment 8716451 [details] [diff] [review]:
-----------------------------------------------------------------
where I commented about boot_complete assignment could use clarification or fixing.
::: adb_android.py
@@ +223,5 @@
> + # and sys report boot completed, then
> + # treat as finished booting.
> + boot_completed = True
> + elif boot_anim_complete == 'stopped':
> + boot_completed = True
could we do;
if not boot_anim_complete or boot_anim_complete == 'stopped':
boot_completed = True
or did we mix up the boot_completed assignments?
Attachment #8716451 -
Flags: review?(jmaher) → review-
Comment 6•9 years ago
|
||
Comment on attachment 8716452 [details] [diff] [review]
bug-1245900-autophone-v1.patch
Review of attachment 8716452 [details] [diff] [review]:
-----------------------------------------------------------------
just one question.
::: autophone.py
@@ +786,5 @@
> + if cfg.has_option(device_name, 'device_ready_retry_wait'):
> + device_ready_retry_wait = cfg.getint(device_name,
> + 'device_ready_retry_wait')
> + else:
> + device_ready_retry_wait = self.options.device_ready_retry_wait
in this case the data in the config will always hold true even if something is specified on the commandline?
Attachment #8716452 -
Flags: review?(jmaher) → review+
Assignee | ||
Comment 7•9 years ago
|
||
(In reply to Joel Maher (:jmaher) from comment #5)
> Comment on attachment 8716451 [details] [diff] [review]
> bug-1245900-adb_android-v1.patch
>
> Review of attachment 8716451 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> where I commented about boot_complete assignment could use clarification or
> fixing.
>
> ::: adb_android.py
> @@ +223,5 @@
> > + # and sys report boot completed, then
> > + # treat as finished booting.
> > + boot_completed = True
> > + elif boot_anim_complete == 'stopped':
> > + boot_completed = True
>
> could we do;
> if not boot_anim_complete or boot_anim_complete == 'stopped':
> boot_completed = True
>
> or did we mix up the boot_completed assignments?
No, that would work. We just lose the ability to explicitly comment on that one condition where we have the sys.boot_completed and dev.bootcomplete but there is no init.svc.bootanim value. We could move the comment to that single if and add additional prose, but it wouldn't help readability I don't think. It seemed more readable breaking out the distinct possibilities to me, but I'm ok with changing it.
(In reply to Joel Maher (:jmaher) from comment #6)
> Comment on attachment 8716452 [details] [diff] [review]
> bug-1245900-autophone-v1.patch
>
> Review of attachment 8716452 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> just one question.
>
> ::: autophone.py
> @@ +786,5 @@
> > + if cfg.has_option(device_name, 'device_ready_retry_wait'):
> > + device_ready_retry_wait = cfg.getint(device_name,
> > + 'device_ready_retry_wait')
> > + else:
> > + device_ready_retry_wait = self.options.device_ready_retry_wait
>
> in this case the data in the config will always hold true even if something
> is specified on the commandline?
Yes. We want to be able to override the default or command line option value per device otherwise we wouldn't be able to specify a global default for most devices with override values for special cases like emulators.
Assignee | ||
Comment 8•9 years ago
|
||
Attachment #8716572 -
Flags: review?(jmaher)
Comment 9•9 years ago
|
||
Comment on attachment 8716572 [details] [diff] [review]
bug-1245900-adb_android-v2.patch
Review of attachment 8716572 [details] [diff] [review]:
-----------------------------------------------------------------
thanks!
Attachment #8716572 -
Flags: review?(jmaher) → review+
Assignee | ||
Comment 10•9 years ago
|
||
Assignee | ||
Comment 11•9 years ago
|
||
This caused errors with SELinux on Nexus 5 devices:
Phone nexus-5-5 requires intervention:
Attempt: 3, SELinux is not permissive
I'm reverting these changes and restarting the servers.
https://github.com/mozilla/autophone/commit/88ef91b33ff8f86d9d34b428b8601bd4a01113fd
https://github.com/mozilla/autophone/commit/7385abcfb947cbc0f4eeab7e935287bad27de1f9
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 12•7 years ago
|
||
Autophone is going away. Resolving these to wontfix.
Status: REOPENED → RESOLVED
Closed: 9 years ago → 7 years ago
Resolution: --- → WONTFIX
Updated•3 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•