[SSSD] [PATCH] TEST: simple_access cleanup

Lukas Slebodnik lslebodn at redhat.com
Wed May 28 15:30:42 UTC 2014


On (28/05/14 16:51), Pavel Reichl wrote:
>On Wed, 2014-05-28 at 15:30 +0200, Lukas Slebodnik wrote:
>> On (27/05/14 22:22), Pavel Reichl wrote:
>> >Hello,
>> >
>> >since_access-test failed for me it didn't pass ever again - even after I
>> >removed my changes. 
>> >
>> >Please see attached patch that seems to fix the issue for me.
>> >
>> >Thanks,
>> >
>> >Pavel Reichl
>> 
>> >From b9f1bdabfc8cddd91571f3ecc0eabb48ee5b0a6c Mon Sep 17 00:00:00 2001
>> >From: Pavel Reichl <preichl at redhat.com>
>> >Date: Tue, 27 May 2014 21:13:48 +0100
>> >Subject: [PATCH] TEST: simple_access-tests - cleanup before running
>> >
>> >---
>> > src/tests/simple_access-tests.c | 1 +
>> > 1 file changed, 1 insertion(+)
>> >
>> >diff --git a/src/tests/simple_access-tests.c b/src/tests/simple_access-tests.c
>> >index 0fa5d049ff98c3cc5ff24961f542ce12356a598e..999277340e436431f14d7710c05c66823e0ebf9e 100644
>> >--- a/src/tests/simple_access-tests.c
>> >+++ b/src/tests/simple_access-tests.c
>> >@@ -661,6 +661,7 @@ int main(int argc, const char *argv[])
>> >     DEBUG_INIT(debug_level);
>> > 
>> >     tests_set_cwd();
>> >+    test_dom_suite_cleanup(TESTS_PATH, TEST_CONF_FILE, LOCAL_SYSDB_FILE);
>> > 
>> >     Suite *s = access_simple_suite();
>> >     SRunner *sr = srunner_create(s);
>> 
>> I agree.
>> I checked other tests and they use test_dom_suite_cleanup
>> before execution of test suite.
>> 
>> Could you also change cleanup before running tests in sysdb-tests.c?
>> 
>> sh-4.2$ grep -A8 tests_set_cwd src/tests/sysdb-tests.c
>>     tests_set_cwd();
>> 
>>     ret = unlink(TESTS_PATH"/"LOCAL_SYSDB_FILE);
>>     if (ret != EOK && errno != ENOENT) {
>>         fprintf(stderr, "Could not delete the test ldb file (%d) (%s)\n",
>>                 errno, strerror(errno));
>>         return EXIT_FAILURE;
>>     }
>>     ^^^^^^^^^
>> It can be replaced with test_dom_suite_cleanup
>> and with this change, TEST_CONF_FILE will removed
>> before execution of tests as well.
>> 
>> LS
>OK, extended patch attached.
>
>PR
>
>
>> 
>> _______________________________________________
>> sssd-devel mailing list
>> sssd-devel at lists.fedorahosted.org
>> https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
>

>From dac2d5b3d640301219d5882480b8bcbb5f3bb785 Mon Sep 17 00:00:00 2001
>From: Pavel Reichl <preichl at redhat.com>
>Date: Wed, 28 May 2014 15:12:06 +0100
>Subject: [PATCH] TEST: simple_access & sysdb tests - cleanup
>
ACK

LS



More information about the sssd-devel mailing list