Closed Bug 1526084 Opened 7 months ago Closed 6 months ago

Android 7.0 x86_64 perma-fail testing/marionette/harness/marionette_harness/tests/unit/test_capabilities.py TestCapabilities.test_additional_capabilities | AssertionError: u'/storage/emulated/0/tests/profile' != '/storage/self/primary/tests/profile'

Categories

(Testing :: Marionette, enhancement, P1)

Version 3
enhancement

Tracking

(firefox67 fixed)

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: gbrown, Assigned: gbrown)

References

Details

Attachments

(1 file)

Bug 1500509 contemplates running marionette tests on the Android 7.0 x86_64 platform. When we try, a few failures are seen, such as this:

https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=226972037&repo=try&lineNumber=1652

[task 2019-02-07T22:20:59.550Z] 22:20:59 WARNING - TEST-UNEXPECTED-FAIL | testing/marionette/harness/marionette_harness/tests/unit/test_capabilities.py TestCapabilities.test_additional_capabilities | AssertionError: u'/storage/emulated/0/tests/profile' != '/storage/self/primary/tests/profile'
[task 2019-02-07T22:20:59.550Z] 22:20:59 INFO - Traceback (most recent call last):
[task 2019-02-07T22:20:59.551Z] 22:20:59 INFO - File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_harness/marionette_test/testcases.py", line 159, in run
[task 2019-02-07T22:20:59.551Z] 22:20:59 INFO - testMethod()
[task 2019-02-07T22:20:59.551Z] 22:20:59 INFO - File "/builds/worker/workspace/build/tests/marionette/tests/testing/marionette/harness/marionette_harness/tests/unit/test_capabilities.py", line 97, in test_additional_capabilities
[task 2019-02-07T22:20:59.551Z] 22:20:59 INFO - self.assertEqual(self.caps["moz:profile"].lower(), current_profile.lower())
[task 2019-02-07T22:20:59.551Z] 22:20:59 INFO - TEST-INFO took 325ms

Bug 1456520 resolved a similar problem.

The issue is that, in this environment, there are multiple layers of links before we get to the actual sdcard directory:

[task 2019-02-07T23:19:57.315Z] 23:19:57 INFO - ls=lrwxrwxrwx 1 root root 21 1970-01-01 01:00 /sdcard -> /storage/self/primary
[task 2019-02-07T23:19:57.421Z] 23:19:57 INFO - ls=lrwxrwxrwx 1 root root 19 2019-02-07 23:18 /storage/self/primary -> /mnt/user/0/primary
[task 2019-02-07T23:19:57.524Z] 23:19:57 INFO - ls=lrwxrwxrwx 1 root root 19 2019-02-07 23:19 /mnt/user/0/primary -> /storage/emulated/0

(In reply to Geoff Brown [:gbrown] from comment #1)

The issue is that, in this environment, there are multiple layers of links before we get to the actual sdcard directory:

[task 2019-02-07T23:19:57.315Z] 23:19:57 INFO - ls=lrwxrwxrwx 1 root root 21 1970-01-01 01:00 /sdcard -> /storage/self/primary
[task 2019-02-07T23:19:57.421Z] 23:19:57 INFO - ls=lrwxrwxrwx 1 root root 19 2019-02-07 23:18 /storage/self/primary -> /mnt/user/0/primary
[task 2019-02-07T23:19:57.524Z] 23:19:57 INFO - ls=lrwxrwxrwx 1 root root 19 2019-02-07 23:19 /mnt/user/0/primary -> /storage/emulated/0

So could we run a Python script on the device which would simply print out the return value from os.path.realpath()?

Flags: needinfo?(gbrown)

(In reply to Henrik Skupin (:whimboo) [⌚️UTC+1] from comment #3)

So could we run a Python script on the device which would simply print out the return value from os.path.realpath()?

Yes, I think that would work, but we don't normally have Python available on Android devices.

Flags: needinfo?(gbrown)

I see. So we will have to use the shell. In that case I will review your patch soon.

Attachment #9042339 - Flags: review?(hskupin) → review+
Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/cb96244f54b1
In Mn test_capabilities.py, allow for multiple links to sdcard; r=whimboo
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.