[SSSD] SSSD Test Suite Coverage

Jakub Hrozek jhrozek at redhat.com
Mon Mar 18 19:22:16 UTC 2013


On Tue, Mar 19, 2013 at 12:31:09AM +0530, Abhishek Singh wrote:
> Changes done.
> 
> My public repo of sssd : https://github.com/AbhishekKumarSingh/sssd
> 

Hi Abhishek,

this is much better, thank you!

I only have two minor style nitpicks now:
1) void test_check_if_uid_is_active_success(void ** state)
We usually don't put a space after the asterisk that denotes a pointer
and the variable name. In other words, we would have used:
"void **state"

2) In main(), I think it would be more readable to put a tab (in my
.vimrc a tab expands to 4 spaces) before names of the tests. So this
block:
 96 int main(void)
 97 {
 98     const UnitTest tests[] = {
 99     unit_test(test_check_if_uid_is_active_success),
100     unit_test(test_check_if_uid_is_active_fail),
101     unit_test(test_get_uid_table)
102     };

Would become this:
 96 int main(void)
 97 {
 98     const UnitTest tests[] = {
 99         unit_test(test_check_if_uid_is_active_success),
100         unit_test(test_check_if_uid_is_active_fail),
101         unit_test(test_get_uid_table)
102     };

Otherwise the test looks very good to me. Compiles and runs just fine.
There's no need to send the patches to the list if you fix these, just
push the changes to your local repo and I'll check them out.

For the record, on IRC we agreed that Abhishek's next step might be to
take a look at one of the modules in the src/utils subdirectory that are
lacking tests. The advantage is that those modules are just utility
functions that are fully synchronous so he wouldn't have to worry about
tevent (yet :-)). Two candidates that come to mind are
src/util/backup_file.c and src/util/io.c

Great work so far Abhishek!



More information about the sssd-devel mailing list