Closed Bug 747268 Opened 14 years ago Closed 14 years ago

devicemanagerADB: listFiles and removeDir fail if unable to access directory

Categories

(Testing :: General, defect)

x86
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla14

People

(Reporter: gbrown, Assigned: gbrown)

Details

Attachments

(1 file)

When trying to run xpcshell tests via ADB, I am getting this: Exception RuntimeError: 'maximum recursion depth exceeded' in <bound method Popen.__del__ of <subprocess.Popen object at 0x9c153ac>> ignored Traceback (most recent call last): File "/home/mozdev/src/config/pythonpath.py", line 52, in <module> main(sys.argv[1:]) File "/home/mozdev/src/config/pythonpath.py", line 44, in main execfile(script, frozenglobals) File "/home/mozdev/src/testing/xpcshell/remotexpcshelltests.py", line 366, in <module> main() File "/home/mozdev/src/testing/xpcshell/remotexpcshelltests.py", line 361, in main **options.__dict__): File "/home/mozdev/src/testing/xpcshell/runxpcshelltests.py", line 649, in runTests self.profileDir = self.setupProfileDir() File "/home/mozdev/src/testing/xpcshell/remotexpcshelltests.py", line 212, in setupProfileDir self.device.removeDir(self.profileDir) File "/home/mozdev/src/build/mobile/devicemanagerADB.py", line 286, in removeDir out += self.removeDir(remoteDir.strip() + "/" + f.strip()) File "/home/mozdev/src/build/mobile/devicemanagerADB.py", line 286, in removeDir out += self.removeDir(remoteDir.strip() + "/" + f.strip()) File "/home/mozdev/src/build/mobile/devicemanagerADB.py", line 286, in removeDir out += self.removeDir(remoteDir.strip() + "/" + f.strip()) ... The problem seems to be that listFiles is returning "Permission denied" for one of the directories; that message is appended to the filename and then that "directory" is passed to listFiles -- giving another error handled in the same fashion...
I added some better handling for "Permission denied", then realized that it was odd to see "Permission Denied" on a rooted phone. It turns out that the recently improved run-as support broke the check for root.
Comment on attachment 616864 [details] [diff] [review] devicemanagerADB patch: improve error handling and check for root Review of attachment 616864 [details] [diff] [review]: ----------------------------------------------------------------- this looks pretty good. Thanks.
Attachment #616864 - Flags: review?(jmaher) → review+
Keywords: checkin-needed
Flags: in-testsuite-
Keywords: checkin-needed
Target Milestone: --- → mozilla14
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: