summaryrefslogtreecommitdiff
path: root/src/test/test-util.c
AgeCommit message (Collapse)Author
2013-08-22test: Make testing work on systems without or old systemdHolger Hans Peter Freyther
* Introduce a macro to conditionally execute tests. This avoids skipping the entire test if some parts require systemd * Skip the journal tests when no /etc/machine-id is present * Change test-catalog to load the catalog from the source directory of systemd. * /proc/PID/comm got introduced in v2.6.33 but travis is still using v2.6.32. * Enable make check and make distcheck on the travis build * Use -D"CATALOG_DIR=STR($(abs_top_srcdir)/catalog)" as a STRINGIY would result in the path '/home/ich/source/linux' to be expanded to '/home/ich/source/1' as linux is defined to 1.
2013-08-15tests: fix indentationThomas Hindoe Paaboel Andersen
2013-07-18util: add split_pair() for splitting foo=bar stringsLennart Poettering
2013-07-16tests: add more tests for shared/util.cThomas Hindoe Paaboel Andersen
2013-06-10Properly check for overflow in offsetsZbigniew Jędrzejewski-Szmek
2013-04-25Use attribute(unused) in PROTECT_ERRNOZbigniew Jędrzejewski-Szmek
clang emits warnings about unused attribute _saved_errno_, which drown out other—potentially useful—warnings. gcc documentation is not exactly verbose about the effects of __attribute__((unused)) on variables, but let's assume that it works if the unit test passes.
2013-04-25util: rework safe_atod() to be locale-independentLennart Poettering
This adds some syntactic sugar with a macro RUN_WITH_LOCALE() that reset the thread-specific locale temporarily.
2013-04-16util: make generation of profcs PID paths nicerLennart Poettering
2013-04-05journal: u64log2 can be expressed just as __builtin_clzll(n) ^ 63UCristian Rodríguez
2013-03-22util: be more picky when validating hostnamesLennart Poettering
No longer allow dots at the beginning or end of host names, Or double dots. https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1152187/comments/14
2013-03-07test-util: add more testsThomas Hindoe Paaboel Andersen
Improve test coverage a bit with tests for close_many strappend (to cover all ways through strnappend)
2013-03-05util: properly escape corner cases in bus_path_escape(), tooLennart Poettering
This follows the suggestions from: http://lists.freedesktop.org/archives/systemd-devel/2013-March/009363.html
2013-02-26test-util.c: added hexchar, unhexchar, octchar, unoctchar, decchar, ↵Daniel Buch
undecchar tests
2013-02-25tests: add a few more tests to test-util.cThomas Hindoe Paaboel Andersen
Add asserts on the resutls in FOREACH_WORD_QUOTED Added tests for: FOREACH_WORD strstrip delete_chars in_charset
2013-02-20tests: more tests for util.cThomas Hindoe Paaboel Andersen
tests for: test_parse_pid test_parse_uid test_safe_atolli test_safe_atod
2013-02-18tests: add test of memdup_multiplyThomas Hindoe Paaboel Andersen
2013-02-11tests: more testsThomas Hindoe Paaboel Andersen
tests for: parse_boolean env_name_is_valid Also convert assert to assert_se to make sure they are run even with optimization. (see commit 9b5d6bd909855543cba75a4469bff6f82845cf0d)
2013-02-06test: add a few tests and tidy upThomas Hindoe Paaboel Andersen
adds test of: strv_find strv_find_prefix strv_overlap strv_sort streq_ptr first_word Splits tests of util.c into own file to avoid clutter as we add more. Removed a few prints and uses _cleanup_free_ to make the tests more focused.