Merge ~pkopylov/qa-regression-testing:testlib_recursive_rm into qa-regression-testing:master
Status: | Needs review |
---|---|
Proposed branch: | ~pkopylov/qa-regression-testing:testlib_recursive_rm |
Merge into: | qa-regression-testing:master |
Diff against target: |
71 lines (+40/-10) 1 file modified
scripts/testlib.py (+40/-10) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Security Team | Pending | ||
Review via email: mp+434933@code.staging.launchpad.net |
Commit message
scripts/testlib.py: recursive_rm() was improved to delete a huge
directory's structure where files/subdirect
suddenly during the deleting process.
Description of the change
We faced some strange effects during running a test-cups.py. There is a teardown stage when recursive_rm() is called just after cupsd is killed. However, it looks like cupsd is still running for a short time, especially at a high-load virtual machine. During its finish, it could create several files in the directory structure to remove. These files prevent deleting a directory that contains them, as a result, the directory's structure remains to exist.
There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.
Thanks for this suggestion - I wonder however whether it would be better to fix test-cups.py so that it waits until cups is actually stopped before trying to remove the directory via this function?
This proposed implementation feels a bit too hackish IMO.