summaryrefslogtreecommitdiff
path: root/src/test/test-path-util.c
AgeCommit message (Collapse)Author
2014-12-16systemctl: refuse to edit runtime dropins when they already exist in /etcZbigniew Jędrzejewski-Szmek
The check for existing unit files and dropins is unified. path_join() is updated to not insert duplicate separators.
2014-12-04test-path-util: fix a leakThomas Hindoe Paaboel Andersen
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-10-31tests: add tests for path_startswithRonny Chevalier
2014-09-30test-path-util: fix a mem leak and avoid confusing coverityThomas Hindoe Paaboel Andersen
Found with coverity. Fixes CID#1237754 and #1237790
2014-08-26test-path-util: use assert_se in all assertionsFilipe Brandenburger
Otherwise they get optimized out when CPPFLAGS='-DNDEBUG' is used, and that causes the tests to fail. Tested: - make check TESTS='test-path-util' CPPFLAGS='-DNDEBUG'
2014-07-26Add utility function to append root to pathZbigniew Jędrzejewski-Szmek
2014-06-22consistently order cleanup attribute before typeThomas Hindoe Paaboel Andersen
2014-06-20test: unit test for using alternate roots with path_strv_resolveMichael Marineau
2014-05-25test-path-util: add tests for path_make_relative()Tanu Kaskinen
2014-04-16test-path-util: fix running with separate build dirZbigniew Jędrzejewski-Szmek
test-path-utils attempts to find itself, but if the binary is not in current directory, the test would fail.
2014-04-12path-util: also check for existence of binary when given absolute pathZbigniew Jędrzejewski-Szmek
In contrast to a filename-only argument, find_binary() did not actually check if an path exists, allowing the code to fail later on. This was OK, but it seems nicer to treat both paths identically. Also take advantage of path_make_absolute_cwd doing strdup() by itself if necessary to simplify.
2014-04-12fsck: Search for fsck.type in PATHMike Gilbert
Modifies find_binary() to accept NULL in the second argument. fsck.type lookup logic moved to new fsck_exists() function, with a test.
2013-12-06Get rid of our reimplementation of basenameZbigniew Jędrzejewski-Szmek
The only problem is that libgen.h #defines basename to point to it's own broken implementation instead of the GNU one. This can be fixed by #undefining basename.
2013-09-26util: properly handle the root dir in PATH_FOREACH_PREFIXLennart Poettering
Also add PATH_FOREACH_PREFIX_MORE which includes the specified dir itself in the iteration
2013-09-25util: add macro for iterating through all prefixes of a pathLennart Poettering
Syntactic sugar in a macro PATH_FOREACH_PREFIX.
2013-09-09run: allow non-absolute paths as commandZbigniew Jędrzejewski-Szmek
2013-07-12test-path-util,test-sched-prio: uninitialize manager to appease valgrindZbigniew Jędrzejewski-Szmek
2013-03-29test-path-util: fix another stupid test failureZbigniew Jędrzejewski-Szmek
2013-03-29test-path-util: fix botched testZbigniew Jędrzejewski-Szmek
2013-03-28tests: add some silly tests for path-util.cZbigniew Jędrzejewski-Szmek