Change in vdsm[master]: it fixes a bug in the hook validation decorator, that left t...

danken at redhat.com danken at redhat.com
Sun Oct 20 11:29:55 UTC 2013


Dan Kenigsberg has posted comments on this change.

Change subject: it fixes a bug in the hook validation decorator, that left tests scripts installed into the system. Now they're properly removed right after the tests
......................................................................


Patch Set 2: Code-Review-1

(4 comments)

....................................................
Commit Message
Line 3: AuthorDate: 2013-10-19 03:27:38 -0400
Line 4: Commit:     Miguel Angel Ajo <miguelangel at ajo.es>
Line 5: CommitDate: 2013-10-19 14:39:57 -0400
Line 6: 
Line 7: it fixes a bug in the hook validation decorator, that left tests
First line of commit message should be a short subject, eg "tests: hook decorator: fix leaked file"
Line 8: scripts installed into the system. Now they're properly removed
Line 9: right after the tests
Line 10: 
Line 11: Enhanced exception capture to avoid passing on unexpected OSError


Line 8: scripts installed into the system. Now they're properly removed
Line 9: right after the tests
Line 10: 
Line 11: Enhanced exception capture to avoid passing on unexpected OSError
Line 12: exceptions.
I prefer a separate patch for this, so the fix of the leak is clearer.
Line 13: 
Line 14: Change-Id: I138c3eab77ea6d35d6a997049940923026e06d96


....................................................
File tests/hookValidation.py
Line 76:                 kwargs['hook_cookiefile'] = cookie_file
Line 77:                 output = test_function(*args, **kwargs)
Line 78:             finally:
Line 79:                 if directory_existed:
Line 80:                     os.unlink(hook_path+'/'+hook_name)
Pep8: spaces around ops
Line 81:                 else:
Line 82:                     shutil.rmtree(hook_path)
Line 83: 
Line 84:                 try:


Line 83: 
Line 84:                 try:
Line 85:                     os.unlink(cookie_file)
Line 86:                 except OSError as unlink_error:
Line 87:                     if unlink_error.errno = os.errno.ENOENT:
==
Line 88:                         pass
Line 89:                     else:
Line 90:                         raise
Line 91: 


-- 
To view, visit http://gerrit.ovirt.org/20310
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I138c3eab77ea6d35d6a997049940923026e06d96
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Miguel Angel Ajo Pelayo <miguelangel at ajo.es>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Miguel Angel Ajo Pelayo <miguelangel at ajo.es>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list