summaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2014-12-13test-unit-name: add more testsRonny Chevalier
Add more test cases for: - unit_name_is_instance - unit_name_to_instance Add tests for: - unit_name_template - unit_name_is_template
2014-12-12test-cap-list: always check libcap comes to the same names as we do, for the ↵Lennart Poettering
names it knows
2014-12-12cap-list: return lower-case capability names, similar to libcap's ↵Lennart Poettering
cap_to_name(), for compat reasons
2014-12-12copy: use btrfs reflinking only whe we know we copy full filesLennart Poettering
2014-12-12shared: add new btrfs-util.[ch] helpers for doing common btrfs operationLennart Poettering
2014-12-12util: when using basename() for creating temporary files, verify the ↵Lennart Poettering
resulting name is actually valid Also, rename filename_is_safe() to filename_is_valid(), since it actually does a full validation for what the kernel will accept as file name, it's not just a heuristic.
2014-12-11test-condition: add more test casesRonny Chevalier
2014-12-11test-strv: add test for strv_equalRonny Chevalier
2014-12-11test-execute: add tests for UMask directiveRonny Chevalier
2014-12-11test-unit-name: add tests for %fRonny Chevalier
2014-12-11tree-wide: use our memset() macros instead of memset() itselfLennart Poettering
2014-12-11treewide: correct spacing near eol in code commentsTorstein Husebø
2014-12-10test: fix some tests when running inside a containerJan Synacek
2014-12-10util: introduce our own gperf based capability listLennart Poettering
This way, we can ensure we have a more complete, up-to-date list of capabilities around, always.
2014-12-09sd-bus: get rid of PID starttime conceptLennart Poettering
As kdbus no longer exports this, remove all traces from sd-bus too
2014-12-04utf8: when escaping unprintable unichars, escape the whole unichar, not just ↵Lennart Poettering
the first byte of it
2014-12-04utf8: intruduce utf8_escape_non_printableWaLyong Cho
2014-12-04test-path-util: fix a leakThomas Hindoe Paaboel Andersen
2014-12-03strv: add calls to add two entries to an strv at onceLennart Poettering
2014-11-28treewide: convert some left-over (usec_t) -1 to USEC_INFINITYLennart Poettering
2014-11-28treewide: introduce UID_INVALID (and friends) as macro for (uid_t) -1Lennart Poettering
2014-11-28treewide: use log_*_errno whenever %m is in the format stringMichal Schmidt
If the format string contains %m, clearly errno must have a meaningful value, so we might as well use log_*_errno to have ERRNO= logged. Using: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/' Plus some whitespace, linewrap, and indent adjustments.
2014-11-28treewide: no need to negate errno for log_*_errno()Michal Schmidt
It corrrectly handles both positive and negative errno values.
2014-11-28treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt
As a followup to 086891e5c1 "log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers", use sed to convert the simple cases to use the new macros: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/' Multi-line log_*() invocations are not covered. And we also should add log_unit_*_errno().
2014-11-27log: add an "error" parameter to all low-level logging calls and intrdouce ↵Lennart Poettering
log_error_errno() as log calls that take error numbers This change has two benefits: - The format string %m will now resolve to the specified error (or to errno if the specified error is 0. This allows getting rid of a ton of strerror() invocations, a function that is not thread-safe. - The specified error can be passed to the journal in the ERRNO= field. Now of course, we just need somebody to convert all cases of this: log_error("Something happened: %s", strerror(-r)); into thus: log_error_errno(-r, "Something happened: %m");
2014-11-27util: add function getting proc environJakub Filak
On the contrary of env, the added function returns all characters cescaped, because it improves reproducibility.
2014-11-23test: support empty environment variables in unit filesIago López Galeiras
Also update TODO, empty environment variables in Environment= and EnvironmentFile= options work.
2014-11-22Do not check for existence of remote binariesZbigniew Jędrzejewski-Szmek
systemd-run would fail when run with -M or -H and an absolute path, if this path did not exists locally. Allow it to continue, since we don't have a nice way of checking if the binary exists remotely. The case where -M or -H is used and a local path is unchanged, and we still iterate over $PATH to find the binary. We need to convert to an absolute path, and we don't have a nice mechanism to check remotely, so we assume that the binary will be located in the same place locally and remotely. http://lists.freedesktop.org/archives/systemd-devel/2014-November/025418.html
2014-11-21util: add functions getting proc cwd and rootJakub Filak
/proc/[pid]/cwd and /proc/[pid]/root are symliks to corresponding directories The added functions returns values of that symlinks.
2014-11-20tests: fix minor memory leakLennart Poettering
2014-11-13udev: support ENV{}=="" global property matchesKay Sievers
2014-11-13udev: move global property handling from libudev to udevdKay Sievers
2014-11-13udev: switch to systemd logging functionsKay Sievers
2014-11-13tests: add test-executeRonny Chevalier
add tests for the following directives: - WorkingDirectory - Personality - IgnoreSIGPIPE - PrivateTmp - SystemCallFilter: It makes test/TEST-04-SECCOMP obsolete, so it has been removed. - SystemCallErrorNumber - User - Group - Environment
2014-11-13manager: allow test run to catch SIGCHLD eventsRonny Chevalier
Otherwise we cannot know when a service exited
2014-11-10strv: rework strv_split_quoted() to use unquote_first_word()Lennart Poettering
This should make the unquoting scheme a bit less naive.
2014-11-08tests: add test-pathRonny Chevalier
It tests all available directives of Path units: - PathChanged - PathModified - PathExists - PathExisysGlob - DirectoryNotEmpty - MakeDirectory - DirectoryMode - Unit
2014-11-07util: rework /proc/cmdline parser to use unquote_first_word()Lennart Poettering
2014-11-07copy: teach copy_bytes() sendfile() support, and then replace ↵Lennart Poettering
sendfile_full() by it
2014-11-06shared: rename condition-util.[ch] to condition.[ch]Lennart Poettering
Now that we only have one file with condition implementations around, we can drop the -util suffix and simplify things a bit.
2014-11-06core: get rid of condition.c and move the remaining call into util.cLennart Poettering
That way only one file with condition code remaining, in src/shared/, rather than src/core/. Next step: dropping the "-util" suffix from condition-util.[ch].
2014-11-06core: introduce the concept of AssertXYZ= similar to ConditionXYZ=, but ↵Lennart Poettering
fatal for a start job if not met
2014-11-06condition: add more test casesLennart Poettering
2014-11-06condition: unify condition logic in one fileLennart Poettering
2014-11-06condition: properly allow passing back errors from condition checksLennart Poettering
2014-11-05condition: rewrite condition_test_kernel_command_line() based on ↵Lennart Poettering
unquote_first_word()
2014-11-05shared: unaligned - use void* instead of unaligned be16_t*Tom Gundersen
2014-11-05test: hashmap-plain - make coverity happyTom Gundersen
Check return value of hashmap_ensure_allocated(). CID#1250807.
2014-11-05test: fileio - make coverity happyTom Gundersen
Explicitly check the length of the read. Fixes CID#1250803.
2014-11-04test: use assert_se in test_hashmap_moveMichal Schmidt