Closed Bug 827554 Opened 12 years ago Closed 12 years ago

xpcshell-tests-remote fails on pandaboard via sut: 'mkdir failed for /data/local/xpcb, Permission denied'

Categories

(Testing :: General, defect)

x86
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 817235

People

(Reporter: gbrown, Assigned: gbrown)

References

Details

'make xpcshell-tests-remote' works on tegras and most other devices now, over adb or sut....but there is a file permission problem on the pandaboards: /data/local is not writable by sutAgent. 1|root@android:/ # ls -l /data drwxrwxr-x system system 2013-01-07 22:40 anr drwxrwx--x system system 2012-12-20 19:51 app drwxrwx--x system system 2000-01-01 00:00 app-private drwx------ system system 2000-01-01 00:00 backup drwxrwx--x system system 2012-05-23 14:46 benchmark drwxrwx--x system system 2012-12-20 19:51 dalvik-cache drwxrwx--x system system 2012-12-20 19:51 data drwxr-x--- root log 2000-01-01 00:00 dontpanic drwxrwx--- drm drm 2000-01-01 00:00 drm drwxr-x--x root root 2013-01-07 23:07 local ... ------------------ root@android:/ # run-as com.mozilla.SUTAgentAndroid root@android:/data/data/com.mozilla.SUTAgentAndroid $ mkdir /data/local/xy mkdir failed for /data/local/xy, Permission denied ------------------ mozdev@mozdev-virtual-machine:/media/extra/objdir-native-droid$ make xpcshell-tests-remote using APK: ./dist/fennec-20.0a1.en-US.android-arm.apk Traceback (most recent call last): File "/home/mozdev/src/testing/xpcshell/remotexpcshelltests.py", line 470, in <module> main() File "/home/mozdev/src/testing/xpcshell/remotexpcshelltests.py", line 461, in main xpcsh = XPCShellRemote(dm, options, args) File "/home/mozdev/src/testing/xpcshell/remotexpcshelltests.py", line 56, in __init__ self.setupUtilities() File "/home/mozdev/src/testing/xpcshell/remotexpcshelltests.py", line 92, in setupUtilities self.device.shellCheckOutput(["mkdir", self.remoteBinDir]); File "/home/mozdev/src/testing/mozbase/mozdevice/mozdevice/devicemanager.py", line 65, in shellCheckOutput raise DMError("Non-zero return code for command: %s (output: '%s', retval: '%s')" % (cmd, output, retval)) mozdevice.devicemanager.DMError: Non-zero return code for command: ['mkdir', '/data/local/xpcb'] (output: 'mkdir failed for /data/local/xpcb, Permission denied', retval: '255') ------------------ A simple "mkdir /data/local/xpcb" by the root user allows the tests to run.
Blocks: 811793
A bit of a hack, but you could run mkdir via shellCheckOutput with root=True to get around this. Ideally the agent would be written in such a way as to not have these permissions problems, but that's probably more involved. (In reply to Geoff Brown [:gbrown] from comment #0) > 'make xpcshell-tests-remote' works on tegras and most other devices now, > over adb or sut....but there is a file permission problem on the > pandaboards: /data/local is not writable by sutAgent. > > 1|root@android:/ # ls -l /data > drwxrwxr-x system system 2013-01-07 22:40 anr > drwxrwx--x system system 2012-12-20 19:51 app > drwxrwx--x system system 2000-01-01 00:00 app-private > drwx------ system system 2000-01-01 00:00 backup > drwxrwx--x system system 2012-05-23 14:46 benchmark > drwxrwx--x system system 2012-12-20 19:51 dalvik-cache > drwxrwx--x system system 2012-12-20 19:51 data > drwxr-x--- root log 2000-01-01 00:00 dontpanic > drwxrwx--- drm drm 2000-01-01 00:00 drm > drwxr-x--x root root 2013-01-07 23:07 local > ... > > ------------------ > > root@android:/ # run-as com.mozilla.SUTAgentAndroid > root@android:/data/data/com.mozilla.SUTAgentAndroid $ mkdir /data/local/xy > mkdir failed for /data/local/xy, Permission denied > > ------------------ > > mozdev@mozdev-virtual-machine:/media/extra/objdir-native-droid$ make > xpcshell-tests-remote > using APK: ./dist/fennec-20.0a1.en-US.android-arm.apk > Traceback (most recent call last): > File "/home/mozdev/src/testing/xpcshell/remotexpcshelltests.py", line 470, > in <module> > main() > File "/home/mozdev/src/testing/xpcshell/remotexpcshelltests.py", line 461, > in main > xpcsh = XPCShellRemote(dm, options, args) > File "/home/mozdev/src/testing/xpcshell/remotexpcshelltests.py", line 56, > in __init__ > self.setupUtilities() > File "/home/mozdev/src/testing/xpcshell/remotexpcshelltests.py", line 92, > in setupUtilities > self.device.shellCheckOutput(["mkdir", self.remoteBinDir]); > File > "/home/mozdev/src/testing/mozbase/mozdevice/mozdevice/devicemanager.py", > line 65, in shellCheckOutput > raise DMError("Non-zero return code for command: %s (output: '%s', > retval: '%s')" % (cmd, output, retval)) > mozdevice.devicemanager.DMError: Non-zero return code for command: ['mkdir', > '/data/local/xpcb'] (output: 'mkdir failed for /data/local/xpcb, Permission > denied', retval: '255') > > ------------------ > > A simple "mkdir /data/local/xpcb" by the root user allows the tests to run.
We ended up using shellCheckOutput, in bug 817235. This is working fine and the special case is noted in a comment.
Assignee: nobody → gbrown
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.