Change in vdsm[ovirt-3.6]: tests: Fix and simplify cleanup after failures

fromani at redhat.com fromani at redhat.com
Tue Oct 20 12:13:57 UTC 2015


Francesco Romani has submitted this change and it was merged.

Change subject: tests: Fix and simplify cleanup after failures
......................................................................


tests: Fix and simplify cleanup after failures

If mount or umount failed, temporary images were not removed because of
incorrect cleanup code. This was not an issue since the temporary files
were created in a temporary directory, but we had two of them, so
failures to remove the first would leave also the second.

This patch simplify cleanup by removing the incorrect cleanup of the
temporary images, as they are removed anyway when the temporary
directory is removed.

Instead of two temporary directories, we use now one directory, and
create the two subdirectories inside it. Now we have to remove only one
directory in tearDown. To make it easier to debug, the temporary
directory is created with a prefix.

Change-Id: Iae829de5ae37008eff3154ad97d5f86c92a41eb2
X-Bug-Url: https://bugzilla.redhat.com/1268229
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/46387
Continuous-Integration: Jenkins CI
Reviewed-by: Shmuel Leib Melamud <smelamud at redhat.com>
Reviewed-by: Sandro Bonazzola <sbonazzo at redhat.com>
Reviewed-by: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/47342
Tested-by: Francesco Romani <fromani at redhat.com>
---
M tests/mkimageTests.py
1 file changed, 6 insertions(+), 6 deletions(-)

Approvals:
  Piotr Kliczewski: Looks good to me, but someone else must approve
  Jenkins CI: Passed CI tests
  Shmuel Leib Melamud: Looks good to me, but someone else must approve
  Dan Kenigsberg: Looks good to me, approved
  Francesco Romani: Verified



-- 
To view, visit https://gerrit.ovirt.org/47342
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iae829de5ae37008eff3154ad97d5f86c92a41eb2
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Shmuel Leib Melamud <smelamud at redhat.com>
Gerrit-Reviewer: automation at ovirt.org


More information about the vdsm-patches mailing list