Dne středa 25 července 2012 13:21:01, Michal Zidek napsal(a):
Unit test for src/db/sysdb_ssh.c
Nack, you are cleaning the directory TESTS_PATH but what if the directory existed (and maybe wasn't empty) before? The least you should do is to exclude the return code from ret variable.
Please use the SSSD_MAIN_OPTS macro in the variable long_options instead defining the debug-level manually there?
An important code-style comment: please declare all variables at the beginning of functions. There are only a handful exceptions of this rule in the code.
Nitpick: you are missing space before SYSDB_OBJECTCLASS in store_one_host_test()
Consider checking results of all functions (for example function like talloc_strdup(), talloc_zero(), sysdb_attrs_add_string(), ...) or at least those on which something else is depending (like allocation of structures) so we don't get segfaults. I'm not stating this as a hard requirement sice we don't have it in most of places in sysdb test suite, but it would be nice to make the coding style a little bit more defensive.
In delete_nonexisting_host_test(): nonexisting -> nonexistent Deleting -> Deletion
Other than that the patch is ok.
Thanks Jan
sssd-devel@lists.fedorahosted.org