History log of /sssd/src/tests/cmocka/test_child_common.c
Revision Date Author Comments Expand
de8815aba87d08b6b7ac5d502dcb1755787e0857 19-May-2016 Jakub Hrozek <jhrozek@redhat.com>

UTIL: exit() the forked process if exec()-ing a child process fails When exec() fails, we should not attempt to continue, but just kill the forked process. The patch adds this logic to the exec_child() and exec_child_ex() functions to avoid code duplication Resolves: https://fedorahosted.org/sssd/ticket/3016 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>

2a5cf841dec2785333117a293fcd8c875ace28b9 12-Apr-2016 Petr Cech <pcech@redhat.com>

TESTS: global_talloc_context push/pop remove Push/pop global_talloc_context into check_leaks is redudant. It is done in leak_check_setup() and leak_check_teardown() functions in src/tests/check_leaks. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>

b5797517abb117cff7330acc894b71deda74be3d 26-Feb-2016 Jakub Hrozek <jhrozek@redhat.com>

tests: Extend test_child_common.c to include tests for the only_extra_args functionality Reviewed-by: Sumit Bose <sbose@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com>

9dcc7dbf04466cd8cd90aa0bb8acbebef9aca832 19-Jan-2016 Sumit Bose <sbose@redhat.com>

UTIL: allow to skip default options for child processes Currently the SSSD default options like e.g. --debug-level are added unconditionally to the command line options of a child process when started with the child helper functions. If a binary from a different source should be started as a child by SSSD those options might not be known or used differently. This patch adds an option to exec_child_ex() which allows to skip the default options and only add specific options. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>

20a2be57d764f58c4a6532310331e26a3273ada8 11-Nov-2015 Lukas Slebodnik <lslebodn@redhat.com>

TESTS: Check return value of check_leaks_pop Reviewed-by: Petr Cech <pcech@redhat.com>

9c62d6619b87f1255ef6515280a20552fca9d925 11-Nov-2015 Lukas Slebodnik <lslebodn@redhat.com>

TESTS: Initialize leak check If leak_check_setup is not called then global_talloc_context was not initialized and check_leaks_pop(global_talloc_context) will fail. Reviewed-by: Petr Cech <pcech@redhat.com>

4e5e846de22407f825fe3b4040d79606818a2419 11-Mar-2015 Jakub Hrozek <jhrozek@redhat.com>

tests: convert all unit tests to cmocka 1.0 or later All tests now use the cmocka-1.0-compatible API. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>

f3d91181d4ee9da3f8bbf4ddf8782951c0ae46c1 15-Jan-2015 Jakub Hrozek <jhrozek@redhat.com>

UTIL: Unify the fd_nonblocking implementation The responder and child_common modules each had their own implementation. Unify it instead and add a unit test. Reviewed-by: Pavel Březina <pbrezina@redhat.com>

44703b84feaafa4f0a4f8df11c5a503dcf48616e 15-Jan-2015 Jakub Hrozek <jhrozek@redhat.com>

TESTS: Cover child_common.c with unit tests The module wasn't tested properly, which made it harder to patch it Reviewed-by: Pavel Březina <pbrezina@redhat.com>

16cb0969f0a9ea71524d852077d6a480740d4f12 13-Jan-2015 Jakub Hrozek <jhrozek@redhat.com>

UTIL: Allow dup-ing child pipe to a different FD Related to: https://fedorahosted.org/sssd/ticket/2544 Adds a new function exec_child_ex and moves setting the extra_argv[] to exec_child_ex() along with specifying the input and output fds. Reviewed-by: Sumit Bose <sbose@redhat.com>

fb3c5cdfcda069a5fbeb7b9d200c0881911364b8 04-Dec-2014 Jakub Hrozek <jhrozek@redhat.com>

Rename test-child to dummy-child Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>

b4f87b42b18888c396e44e7359f7aafb092221bf 03-Dec-2014 Jakub Hrozek <jhrozek@redhat.com>

Add extra_args to exec_child() Related: https://fedorahosted.org/sssd/ticket/2503 Currently all child processes use the same arguments, the construction of argv[] is even hardcoded in exec_child(). Add an extra_args[] array that extends the common set of argvs so that we can have child-specific arguments. Also adds a unit test. Reviewed-by: Sumit Bose <sbose@redhat.com>

e00c2b5ac4963de9521599c88597b7fb97339d0e 03-Dec-2014 Jakub Hrozek <jhrozek@redhat.com>

TESTS: Basic child tests The child_common.c module had no unit tests, yet we need to amend it. Reviewed-by: Sumit Bose <sbose@redhat.com>