Closed Bug 583129 Opened 14 years ago Closed 12 years ago

Use native windows tools to clobber directories

Categories

(Infrastructure & Operations Graveyard :: CIDuty, task, P3)

x86
Windows 7

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 727551

People

(Reporter: jhford, Assigned: coop)

References

Details

(Whiteboard: [automation][simple])

We currently rely on msys's rm program to clobber unit test directories. Instead, we should try using the os native tools to remove a directory (attrib and rmdir).
Whiteboard: [automation]
Severity: normal → enhancement
Priority: -- → P5
Blocks: 586418
Priority: P5 → P4
Whiteboard: [automation] → [automation][simple]
so, some simple timings on w32-ix-slave05: hg clone mozilla-central t1 && time rm -rf t1 184 seconds real time hg clone mozilla-central t1 && time cmd /c 'rmdir /s /q t1' 66 seconds real time So rmdir is almost 3x as fast. What's attrib for?
Summary: Use native windows tools to clobber unittest directories → Use native windows tools to clobber directories
My original intention with this bug was to deal with the issues with msys' rm. That is quite a nice performance improvement. The issues with the rm from msys have shown to exist on a build slave (bug 643073). (In reply to comment #1) > So rmdir is almost 3x as fast. > > What's attrib for? It is to remove system, hidden, read-only attributes so that rmdir doesn't fail on system, hidden, read-only files.
attrib takes 3 minutes to work through 'configs', whereas rmdir takes 3 second to delete it...
but if you don't run attrib, you might not be able to run rmdir. if return codes are set properly we could do something like if not rmdir(configs) == 0: attrib(configs) rmdir(configs)
Blocks: 661585
No longer blocks: 586418
This is starting to show up on windows builds. I think we need to either use attrib+rmdir or implement rm as a python script/c program.
Severity: enhancement → normal
I'm debugging an issue where I can't change the attributes and I can't remove the files at all. That 1 showing up for the file means that there is one hard link but not sure how to determine which. C:\talos-slave\test\build>ls -l xpcshell\tests\toolkit\mozapps\update\test_svc\unit\0000_svc_applyToDir\a\b\0\00\00png0.png -rw-rw-rw- 1 cltbld 0 878 2012-01-17 09:52 xpcshell\tests\toolkit\mozapps\update\test_svc\unit\0000_svc_applyToDir\a\b\0\00\00png0.png C:\talos-slave\test\build>attrib -r -s -h xpcshell\tests\toolkit\mozapps\update\test_svc\unit\0000_svc_applyToDir\a\b\0\00/*.* /S Access denied - C:\talos-slave\test\build\xpcshell\tests\toolkit\mozapps\update\test_svc\unit\0000_svc_applyToDir\a\b\0\00\00png0.png Access denied - C:\talos-slave\test\build\xpcshell\tests\toolkit\mozapps\update\test_svc\unit\0000_svc_applyToDir\a\b\0\00\00text0 Access denied - C:\talos-slave\test\build\xpcshell\tests\toolkit\mozapps\update\test_svc\unit\0000_svc_applyToDir\a\b\0\00\00text1 C:\talos-slave\test\build>rmdir /s /q xpcshell\tests\toolkit\mozapps\update\test_svc\unit\0000_svc_applyToDir\a\b\0\00 xpcshell\tests\toolkit\mozapps\update\test_svc\unit\0000_svc_applyToDir\a\b\0\00\00png0.png - Access is denied. xpcshell\tests\toolkit\mozapps\update\test_svc\unit\0000_svc_applyToDir\a\b\0\00\00text0 - Access is denied. xpcshell\tests\toolkit\mozapps\update\test_svc\unit\0000_svc_applyToDir\a\b\0\00\00text1 - Access is denied. Access is denied.
it looks like you are trying to change an Admin owned file as a non-admin user (or because of UAC, an admin in non-admin context). Try launching a command prompt as administrator and trying again.
Lets look at using my winrm program, available at http://hg.mozilla.org/users/jford_mozilla.com/jhford-native-rm
Depends on: 727551
jhford: are you going to have time to get this deployed soon?
Blocks: 739030
(In reply to Chris Cooper [:coop] from comment #10) > jhford: are you going to have time to get this deployed soon? nope. putting bug back in the pool
Assignee: jhford → nobody
Whiteboard: [automation][simple] → [automation][simple][triagefollowup]
Assignee: nobody → coop
Component: Release Engineering → Release Engineering: Platform Support
Priority: P4 → P3
QA Contact: release → coop
Whiteboard: [automation][simple][triagefollowup] → [automation][simple]
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Product: mozilla.org → Release Engineering
Component: Platform Support → Buildduty
Product: Release Engineering → Infrastructure & Operations
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in before you can comment on or make changes to this bug.