
2011/5/31 Eric Blake <eblake@redhat.com>:
On 05/31/2011 07:11 AM, Matthias Bolte wrote:
Convert openvzLocateConfFile to a replaceable callback to allow testing the config file parsing without rewriting the whole OpenVZ config parsing to a more testable structure.
Also ignore the openvzutilstest binary.
Serves me right for pushing that .gitignore fix before finishing reading my inbox...
--- src/openvz/openvz_conf.c | 28 +++++++++++---- src/openvz/openvz_conf.h | 6 +++ tests/.gitignore | 1 + tests/openvzutilstest.c | 78 ++++++++++++++++++++++++++++++++++++++++++++ tests/openvzutilstest.conf | 1 + 5 files changed, 106 insertions(+), 8 deletions(-)
+++ b/tests/.gitignore @@ -16,6 +16,7 @@ object-locking object-locking-files.txt object-locking.cmi object-locking.cmx +openvzutilstest
I'd rather move towards having more exceptions in the top-level .gitignore, and fewer lines here in the directory-specific tests/.gitignore (for that matter, since .gitignore is hierarchical, I would eventually like to get rid of all the child .gitignore files and put everything in the top level). But that's a cleanup for another day. Meanwhile, this hunk is no longer necessary, thanks to commit ad962bc.
ACK to the rest of the patch; more testsuite exposure is always okay, even after feature freeze.
I removed one hunk from that patch, that should actually have been a patch [1] on its own: dom->def->virtType = VIR_DOMAIN_VIRT_OPENVZ; And I removed one indirection from openvzLocateConfFile by directly making openvzLocateConfFile a function pointer and removing this piece of code: static int openvzLocateConfFile(int vpsid, char **conffile, const char *ext) { return openvzLocateConfFileCallback(vpsid, conffile, ext); } [1] https://www.redhat.com/archives/libvir-list/2011-June/msg00003.html Thanks, pushed. Matthias