----- Original Message -----
On Fri, May 23, 2014 at 03:50:18PM -0400, Yassir Elley wrote:
----- Original Message -----
On Fri, May 23, 2014 at 12:29:37PM -0400, Yassir Elley wrote:
----- Original Message -----
On Tue, May 20, 2014 at 10:30:15PM -0400, Yassir Elley wrote:
Hi,
The attached patch adds unit tests for some of the ad_gpo functionality. It also fixes some failure mode processing code in ad_gpo.c that was uncovered by the unit tests. This patch depends on a previously submitted patch ("Remove GPO dependency on libsamba-security"), which has not yet been pushed to master.
Regards, Yassir.
Can you send a rebased version on top of the latest version of your 'AD-GPO: Remove dependency on libsamba-security' patch?
bye, Sumit _______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
Rebased version of patch attached.
I'm sorry, but the test does not compile on top of you other patches. I think it is due to adding the idmap context:
CC src/tests/cmocka/ad_gpo_tests-test_ad_gpo.o ../src/tests/cmocka/test_ad_gpo.c: In function 'test_ad_gpo_ace_includes_client_sid': ../src/tests/cmocka/test_ad_gpo.c:269:42: warning: passing argument 5 of 'ad_gpo_ace_includes_client_sid' from incompatible pointer type [enabled by default] ace_dom_sid, &includes_client_sid); ^ In file included from ../src/tests/cmocka/test_ad_gpo.c:33:0: ../src/providers/ad/ad_gpo.c:253:1: note: expected 'struct sss_idmap_ctx *' but argument is of type '_Bool *' ad_gpo_ace_includes_client_sid(const char *user_sid, ^ ../src/tests/cmocka/test_ad_gpo.c:269:42: error: too few arguments to function 'ad_gpo_ace_includes_client_sid' ace_dom_sid, &includes_client_sid); ^ In file included from ../src/tests/cmocka/test_ad_gpo.c:33:0: ../src/providers/ad/ad_gpo.c:253:1: note: declared here ad_gpo_ace_includes_client_sid(const char *user_sid, ^ make[3]: *** [src/tests/cmocka/ad_gpo_tests-test_ad_gpo.o] Error 1
bye, Sumit
That was very sloppy of me. Sorry about that. I've attached a revised patch.
The test failed for me because of an issue in test_populate_som_list(). You should either set num_soms = 0 in the declaration or skip
assert_int_equal(num_soms, expected->num_soms);
if ret != EOK. Because otherwise you would compare with an uninitialized value.
I think skipping the assert_int_equal() makes more sense because you do not expect num_soms to be set in the error case.
bye, Sumit
Although it is curious that the tests are failing for you but not for me, I do agree with your comments. There is a similar issue in test_populate_gplink_list. I have fixed them both and attached a revised patch.
Regards, Yassir.