On (17/06/16 16:54), Lukas Slebodnik wrote: >On (14/06/16 15:30), Pavel Březina wrote: >>On 05/16/2016 02:00 PM, Pavel Březina wrote: >>> Hi, >>> the patches are finally ready to be tested and reviewed. It is too huge >>> to be sent to the list so please checkout my fedorapeople or github repo: >>> >>> https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/log/?h=backend >>> https://github.com/pbrezina/sssd/tree/backend >>> >>> Subdomain handlers are not yet converted so subdomain support is >>> disabled, otherwise everything should work although I'm sure you'll find >>> some bugs. >>> >>> I managed to do some simple tests (initgroups, authentication) with ldap >>> provider so far and will continue testing and fixing so if you find a >>> bug make sure you run with the latest version before reporting it please >>> :-) >>> >>> Since the changes touch almost all areas of SSSD I encourage everyone to >>> run and try. Some handlers were converted quite easily, some took more >>> handy work. Areas that are most likely to contain some bugs are these >>> (please give it extra attention): >>> >>> - proxy provider >>> - if group membership changes during initgroups, nss memory cache should >>> be clear through dbus call >>> - selinux support >>> - hbac support >>> - change password >>> - password migration (ipa) >>> >>> Don't be alarmed with the number of new lines -- there is not that many >>> changes. I copied all touched files and suffixed them with _new so sssd >>> can be compiled and kept working until the latest patches. I also wanted >>> to keep the original code intact for comparison (it was easier for >>> development and it may be handy for bug chasing), you can simply use >>> some diff tool to see the changes. We can squash it in the end. >>> >>> When I will be confident that the patches are stable I will do some >>> clean up and remove content that is no longer needed. >> >>Just a quick update: all found bugs were fixed, CI pass, all downstream tests >>which were tried (I think all but IPA) pass. > >There is a bug in forest user lookup when joined to child domain >I verified that it works on master. > >There is a current master installed on machine which >I gave you. Try to copmare results with your branch > BTW your patch with braces in debug messages remind me to check missing new lines in your patches. @see attached diff
and please also clean test directories after successful tests. @see attached diff LS
diff --git a/src/providers/data_provider/dp_methods.c b/src/providers/data_provider/dp_methods.c index 0fd9f13..e4290be 100644 --- a/src/providers/data_provider/dp_methods.c +++ b/src/providers/data_provider/dp_methods.c @@ -44,7 +44,7 @@ void _dp_set_method(struct dp_method *methods, /* Each method can be set only once, if we attempt to set it twice it * is a bug in module initialization. */ if (methods[method].send_fn != NULL) { - DEBUG(SSSDBG_CRIT_FAILURE, "Bug: method %d is already set!", method); + DEBUG(SSSDBG_CRIT_FAILURE, "Bug: method %d is already set!\n", method); return; } diff --git a/src/providers/data_provider/dp_targets.c b/src/providers/data_provider/dp_targets.c index cc060d5..a4288ad 100644 --- a/src/providers/data_provider/dp_targets.c +++ b/src/providers/data_provider/dp_targets.c @@ -400,7 +400,7 @@ static char *dp_get_module_name(TALLOC_CTX *mem_ctx, talloc_free(option); if (ret != EOK) { DEBUG(SSSDBG_CRIT_FAILURE, "Unable to read provider value " - "[%d]: %s", ret, sss_strerror(ret)); + "[%d]: %s\n", ret, sss_strerror(ret)); return NULL; } @@ -436,7 +436,7 @@ static errno_t dp_load_configuration(struct confdb_ctx *cdb, type, &is_default); if (module == NULL) { DEBUG(SSSDBG_CONF_SETTINGS, "No provider is specified for" - " [%s]", name); + " [%s]\n", name); continue; } else { DEBUG(SSSDBG_CONF_SETTINGS, "Using [%s] provider for [%s]\n", diff --git a/src/providers/ipa/ipa_access_new.c b/src/providers/ipa/ipa_access_new.c index d31b90d..9ab005e 100644 --- a/src/providers/ipa/ipa_access_new.c +++ b/src/providers/ipa/ipa_access_new.c @@ -457,7 +457,7 @@ static void ipa_fetch_hbac_rules_done(struct tevent_req *subreq) ret = ipa_save_hbac(state->be_ctx->domain, state); if (ret != EOK) { - DEBUG(SSSDBG_CRIT_FAILURE, "Unable to save HBAC rules"); + DEBUG(SSSDBG_CRIT_FAILURE, "Unable to save HBAC rules\n"); goto done; } diff --git a/src/providers/ipa/ipa_subdomains_new.c b/src/providers/ipa/ipa_subdomains_new.c index 3eadfc6..981ef96 100644 --- a/src/providers/ipa/ipa_subdomains_new.c +++ b/src/providers/ipa/ipa_subdomains_new.c @@ -1203,7 +1203,7 @@ static void ipa_subdomains_view_name_done(struct tevent_req *subreq) state->sd_ctx->ipa_id_ctx, view_name, state->sd_ctx->view_read_at_init); if (ret != EOK) { - DEBUG(SSSDBG_CRIT_FAILURE, "Unable to set view [%d]: %s", + DEBUG(SSSDBG_CRIT_FAILURE, "Unable to set view [%d]: %s\n", ret, sss_strerror(ret)); goto done; }
diff --git a/src/tests/cmocka/data_provider/test_dp_request.c b/src/tests/cmocka/data_provider/test_dp_request.c index bcfcbf1..ebe5188 100644 --- a/src/tests/cmocka/data_provider/test_dp_request.c +++ b/src/tests/cmocka/data_provider/test_dp_request.c @@ -412,6 +412,7 @@ int main(int argc, const char *argv[]) { poptContext pc; int opt; + int rv; int no_cleanup = 0; struct poptOption long_options[] = { POPT_AUTOHELP @@ -459,5 +460,10 @@ int main(int argc, const char *argv[]) test_dom_suite_cleanup(TESTS_PATH, TEST_CONF_DB, TEST_DOM_NAME); test_dom_suite_setup(TESTS_PATH); - return cmocka_run_group_tests(tests, NULL, NULL); + rv = cmocka_run_group_tests(tests, NULL, NULL); + if (rv == 0 && !no_cleanup) { + test_dom_suite_cleanup(TESTS_PATH, TEST_CONF_DB, TEST_DOM_NAME); + } + + return rv; } diff --git a/src/tests/cmocka/data_provider/test_dp_special.c b/src/tests/cmocka/data_provider/test_dp_special.c index 73e3019..b534659 100644 --- a/src/tests/cmocka/data_provider/test_dp_special.c +++ b/src/tests/cmocka/data_provider/test_dp_special.c @@ -140,6 +140,7 @@ int main(int argc, const char *argv[]) { poptContext pc; int opt; + int rv; int no_cleanup = 0; struct poptOption long_options[] = { POPT_AUTOHELP @@ -181,5 +182,10 @@ int main(int argc, const char *argv[]) test_dom_suite_cleanup(TESTS_PATH, TEST_CONF_DB, TEST_DOM_NAME); test_dom_suite_setup(TESTS_PATH); - return cmocka_run_group_tests(tests, NULL, NULL); + rv = cmocka_run_group_tests(tests, NULL, NULL); + if (rv == 0 && !no_cleanup) { + test_dom_suite_cleanup(TESTS_PATH, TEST_CONF_DB, TEST_DOM_NAME); + } + + return rv; }
_______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/sssd-devel@lists.fedorahosted.org