summaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2013-03-26tests: skip bus test if bus cannot be openedZbigniew Jędrzejewski-Szmek
To make the result more visible, special return value is used to tell automake that the test was skipped. While at it, use the same return value in other skipped tests.
2013-03-26tests: fix size_t in format stringZbigniew Jędrzejewski-Szmek
2013-03-26Simplify the meaning of %sZbigniew Jędrzejewski-Szmek
The rules governing %s where just too complicated. First of all, looking at $SHELL is dangerous. For systemd --system, it usually wouldn't be set. But it could be set if the admin first started a debug shell, let's say /sbin/sash, and then launched systemd from it. This shouldn't influence how daemons are started later on, so is better ignored. Similar reasoning holds for session mode. Some shells set $SHELL, while other set it only when it wasn't set previously (e.g. zsh). This results in fragility that is better avoided by ignoring $SHELL totally. With $SHELL out of the way, simplify things by saying that %s==/bin/sh for root, and the configured shell otherwise. get_shell() is the only caller, so it can be inlined. Fixes one issue seen with 'make check'.
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-21shared: add simple priority queue implementationLennart Poettering
2013-03-18test-strv.c: test STRV_FOREACH_PAIR macroDaniel Buch
2013-03-15core: reuse the same /tmp, /var/tmp and inaccessible dirMichal Sekletar
All Execs within the service, will get mounted the same /tmp and /var/tmp directories, if service is configured with PrivateTmp=yes. Temporary directories are cleaned up by service itself in addition to systemd-tmpfiles. Directory which is mounted as inaccessible is created at runtime in /run/systemd.
2013-03-09Fix typos of /etc/systemd/systemdZbigniew Jędrzejewski-Szmek
<Lekensteyn> The 198 announcement mentions "/etc/systemd/systemd/foobar.service.d/*.conf", is that a typo? I only have a /etc/systemd/system/. Is there a manpage describing this new feature?
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-18test-strv.c: ported test_specifier_printf() to _cleanup_free_ + assert_se + ↵Daniel Buch
cleanup
2013-02-18test-strv.c: added OOM check for current testsDaniel Buch
New OOM check patch: I do assert_se() before variable is used to do correct check.
2013-02-18test-strv.c: added strv_split_nulstr() testDaniel Buch
2013-02-18tests: add test of memdup_multiplyThomas Hindoe Paaboel Andersen
2013-02-14honor SELinux labels, when creating and writing config filesHarald Hoyer
Also split out some fileio functions to fileio.c and provide a SELinux aware pendant in fileio-label.c see https://bugzilla.redhat.com/show_bug.cgi?id=881577
2013-02-13test-strv.c: Changed assert() to assert_se()Daniel Buch
test-strv.c: Indent fix
2013-02-13test-strv.c: added strv_append testDaniel Buch
2013-02-13test-strv.c: added strv_merge_concat testDaniel Buch
2013-02-13test-strv.c: added strv_merge testDaniel Buch
2013-02-13use streq instead of strcmpThomas Hindoe Paaboel Andersen
2013-02-13test-udev: include missing.hAleksander Morgado
We need MS_REC and MS_SHARED defined for a proper compilation, so get them from 'missing.h' if not defined already.
2013-02-13tests: add test for continuation lines with commentsZbigniew Jędrzejewski-Szmek
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-11test-env-replace: better user assert_se() everywhereLennart Poettering
For test tools it's better to use assert_se() rather than assert(), since the former is not optimized away, even if -DNDEBUG is used. That means the test program now retains its usefulness even if -DNDEBUG is used. This also adds in some OOM checks, to be extra anal...
2013-02-11env: considerably beef up environment cleaning logicLennart Poettering
Now, actually check if the environment variable names and values used are valid, before accepting them. With this in place are at some places more rigid than POSIX, and less rigid at others. For example, this code allows lower-case environment variables (which POSIX suggests not to use), but it will not allow non-UTF8 variable values. All in all this should be a good middle ground of what to allow and what not to allow as environment variables. (This also splits out all environment related calls into env-util.[ch])
2013-02-10tests: add tests of strxcpyxThomas Hindoe Paaboel Andersen
also fix a bad indentation in test-strbug.c
2013-02-09tests: add test of strbufThomas Hindoe Paaboel Andersen
2013-02-08tests: add more testsThomas Hindoe Paaboel Andersen
Adds tests of: strv_env_delete strv_env_unset strv_env_set
2013-02-07test-env-replace: assert results instead of printing themThomas Hindoe Paaboel Andersen
Also code cleanup and split into functions in preparation for more tests to come.
2013-02-06tests: skip tests if manager cannot be createdZbigniew Jędrzejewski-Szmek
When running without a user session, tests fail.
2013-02-07tests: move strv_parse_nulstr to test-strv, and actually test itThomas Hindoe Paaboel Andersen
The test was originally added with this commit message: "ask-password: supported plymouth cached passwords"
2013-02-07strv: add strv_printThomas Hindoe Paaboel Andersen
Clearer, and spares the temp variable.
2013-02-06tests: run manager in session modeZbigniew Jędrzejewski-Szmek
False positives pop up otherwise. FAIL: test-unit-name (exit: 134) ================================ Failed to open /dev/tty0: Permission denied Failed to create root cgroup hierarchy: Permission denied Assertion 'manager_new(SYSTEMD_SYSTEM, &m) == 0' failed at src/test/test-unit-name.c:125, function test_unit_printf(). Aborting.
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.
2013-01-30test-strv.c: test strv_join addedDaniel Buch
2013-01-30test-strv.c: Split tests into seperate functionsDaniel Buch
test-strv.c: Leaves main clean for additional tests
2013-01-29tests: add test for unit name printingZbigniew Jędrzejewski-Szmek
2013-01-29tests: compress unit name tests and add more assertsZbigniew Jędrzejewski-Szmek
2013-01-29tests: add test for install_full_printf()Zbigniew Jędrzejewski-Szmek
2013-01-19core: if the bootloader supports it, determine firmware and boot loader delayLennart Poettering
This allows us to print simple performance data of all parts of the boot now: - firmware - boot loader - kernel - initrd - userspace This only works for bootloaders which support passing TSC data via EFI variables. As of now that's only gummiboot.
2013-01-18core/cgroup-util: simplify functions and add testsZbigniew Jędrzejewski-Szmek
2013-01-18util: modernization and test for load_env_fileZbigniew Jędrzejewski-Szmek
2013-01-14core: add bus API and systemctl commands for altering cgroup parameters ↵Lennart Poettering
during runtime
2013-01-09udev: move string copy functions to shared/Kay Sievers
2012-12-23journalctl: strip TABs and ANSI color sequences from log messages when ↵Lennart Poettering
displaying them
2012-11-23time-util: teach parse_timestamp to parse weekdaysLennart Poettering
2012-11-23util: teach parse_timestamp() to parse results of format_timestamp_relative()Lennart Poettering