Merge ~pkopylov/qa-regression-testing:testlib_recursive_rm into qa-regression-testing:master

Proposed by Pavel Kopylov
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)
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/subdirectories can appear
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.

To post a comment you must log in.
Revision history for this message
Alex Murray (alexmurray) wrote :

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.

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches