summaryrefslogtreecommitdiff
path: root/src/tests/util-tests.c
AgeCommit message (Collapse)AuthorFilesLines
2013-09-05utils: add is_host_in_domain()Pavel Březina1-0/+28
2013-09-03UTIL: Use standard maximum value of type size_tLukas Slebodnik1-6/+6
It is better to use standard constant for maximum value of type size_t, instead of reinventing wheel with own defined constant SIZE_T_MAX This patch replace string "SIZE_T_MAX" -> "SIZE_MAX"
2013-04-17Make leak checks usable in tests that do not utilize checkJakub Hrozek1-3/+3
* Remove check-specific failure reporting from common_check.c * Check-specific abstraction over memleak checks * Rename common_check.c to leak_check.c
2013-01-02failover: Protect against empty host namesMichal Zidek1-0/+91
Added new parameter to split_on_separator that allows to skip empty values. The whole function was rewritten. Unit test case was added to check the new implementation. https://fedorahosted.org/sssd/ticket/1484
2012-11-14Add string_in_list() and add_string_to_list() with testsSumit Bose1-0/+83
string_in_list() and add_string_to_list() are two utilities for NULL terminated strings arrays. add_string_to_list() adds a new string to an existing list or creates a new one with the strings as only item if there is not list. string_in_list() checks if a given string is in the list. It can be used case sensitive or in-sensitive.
2012-10-29Include talloc log in our debug facilityMichal Zidek1-1/+1
https://fedorahosted.org/sssd/ticket/1495
2012-04-20Move atomic io function to a separate moduleJakub Hrozek1-9/+9
We'll be using it on various places of the SSSD. The function is in its own file to allow using just the one piece without having to drag in the whole util.c module.
2012-04-20sss_atomic_io: Do not fail reads with EPIPE if there is not enough data to readJakub Hrozek1-0/+206
Also adds a unit test for sss_atomic_io()
2012-01-09Add a random + identity test for murmurhash3Simo Sorce1-0/+29
This test always generate a random string so each time the test is run we will test the hash function with a new value. It also hashes the same string twice and compares the result so that we have a chance of catching if uninitialized variables are getting mixed into the value calculation and end up generating different results for the same input.
2012-01-09util: add murmurhash3 hash functionSimo Sorce1-0/+24
2012-01-04tests: fix test group of utf8 testsSimo Sorce1-5/+5
2011-12-16sss_utf8_tolower utility function+unit testsJakub Hrozek1-0/+96
2011-08-25New DEBUG facility - SSSDBG_UNRESOLVED changed from -1 to 0Pavel Březina1-1/+4
Removed: SSS_UNRESOLVED_DEBUG_LEVEL (completely replaced with SSSDBG_UNRESOLVED) Added new macro: CONVERT_AND_SET_DEBUG_LEVEL(new_value) Changes unresolved debug level value (SSSDBG_UNRESOLVED) from -1 to 0 so DEBUG macro could be reduced by one condition. Anyway, it has a minor effect, every time you want to load debug_level from command line parameters, you have to use following pattern: /* Set debug level to invalid value so we can deside if -d 0 was used. */ debug_level = SSSDBG_INVALID; pc = poptGetContext(argv[0], argc, argv, long_options, 0); while((opt = poptGetNextOpt(pc)) != -1) { ... } CONVERT_AND_SET_DEBUG_LEVEL(debug_level);
2011-08-25New DEBUG facility - conversionPavel Březina1-0/+2
https://fedorahosted.org/sssd/ticket/925 Conversion of the old debug_level format to the new one. (only where it was necessary) Removed: SSS_DEFAULT_DEBUG_LEVEL (completely replaced with SSSDBG_DEFAULT)
2011-06-15Unit test for parge_argsJakub Hrozek1-0/+58
2011-01-11Validate user supplied size of data itemsSumit Bose1-0/+14
Specially crafted packages might lead to an integer overflow and the parsing of the input buffer might not continue as expected. This issue was identified by Sebastian Krahmer <krahmer@suse.de>.
2010-11-15Add utility function to sanitize LDAP/LDB filtersStephen Gallagher1-0/+68
Also adds a unit test.
2010-10-13Use POPT_TABLEEND to close option tableSumit Bose1-1/+1
2010-08-03Add diff_string_lists utility functionStephen Gallagher1-0/+227
Includes a unit test