[SSSD] [PATCH] TEST: simple_access cleanup

Pavel Reichl preichl at redhat.com
Wed May 28 14:51:04 UTC 2014


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-TEST-simple_access-sysdb-tests-cleanup.patch
Type: text/x-patch
Size: 1824 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20140528/23ad7b38/attachment.bin>


More information about the sssd-devel mailing list