summaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2012-11-23Use libkmod only when requestedRichard Yao
We support module loading through modprobe when libkmod is neither available nor wanted. Signed-off-by: Richard Yao <ryao@gentoo.org>
2012-11-23Reintroduce blkid-kmodRichard Yao
This opens the door to using disabling the use of kmod from autotools. Signed-off-by: Richard Yao <ryao@gentoo.org>
2012-11-19Reintroduce blkid-builtinRichard Yao
The build failure that prompted its removal has been resolved. Signed-off-by: Richard Yao <ryao@gentoo.org>
2012-11-19Check for unshare on the configure and provide an inline replacement when ↵klondike
not available
2012-11-18Add missing #include <sys/syscall.h>Richard Yao
A last minute change to commit 189d09a42e054bebd91ea9690fede33b41996260 caused a build failure. This fixes it. Signed-off-by: Richard Yao <ryao@gentoo.org>
2012-11-18Define unshare() macro to avoid dependence on __GNU_SOURCERichard Yao
unshare() is a linux syscall that we need. Unfortunately, access to it depends on __GNU_SOURCE, which we would like to avoid. As such, we define a macro to invoke it by its syscall code. This is necessary to avoid the following warning from Clang: implicit declaration of function 'unshare' is invalid in C99 [-Wimplicit-function-declaration] Signed-off-by: Richard Yao <ryao@gentoo.org>
2012-11-18Fix wrong format warningsKacper Kowalik (Xarthisius)
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2012-11-18Got helper in src/* and make distcheck workingAnthony G. Basile
2012-11-17Restructure src/ as per lu_zeroAnthony G. Basile
2012-11-17Rename src/shared to src/include, a saner nameAnthony G. Basile
2012-11-17src/test: disable for now to get a full buildAnthony G. Basile
2012-11-17Eliminate blkid-builtinRichard Yao
Changes to rules were introduced by 7c2dee4a4d7f1b264031daaee786a8fe429884e1 while builtin-blkid support was introduced in other commits. The removal of systemd resulted in this code causing linker errors. This code adds complexity with no clear benefit, so we remove it. Signed-off-by: Richard Yao <ryao@gentoo.org>
2012-11-17Eliminate kmod dependencyRichard Yao
Changes to rules were introduced by 06316d9f1a91b4d3efdb7402e72498cb3deb1806 while kmod support was introduced in other commits. A ton of commits were made involving kmod and it is quite clear that it is broken, so we remove it. This changes our rules to depend on modprobe. As long as the modprobe binary is in /, and not /usr, udev module loading should function properly. Signed-off-by: Richard Yao <ryao@gentoo.org>
2012-11-15Second step of revamping the build systemAnthony G. Basile
The original Makefile.am was drawn to the top level. This commit breaks it out into the various directories with SUBDIRS connecting them. This makes each directory easier to maintain.
2012-11-15Isolation of udev code from remaining systemdAnthony G. Basile
This commit is a first attempt to isolate the udev code from the remaining code base. It intentionally does not modify any files but purely delete files which, on a first examination, appear to not be needed. This is a sweeping commit which may easily have missed needed code. Files can be retrieved by doing a checkout from the previous commit: git checkout 2944f347d0 -- <filename>
2012-11-14shared: add API for replacing @FOO@ style variables in stringsLennart Poettering
2012-11-12use the same email address everywhereKay Sievers
2012-10-28logind: support for hybrid sleep (i.e. suspend+hibernate at the same time)Lennart Poettering
2012-10-27libudev: import hwdb and export lookup interfaceKay Sievers
2012-10-11journalctl: implement --since= and --until for filtering by timeLennart Poettering
2012-10-08udev: fix testKay Sievers
2012-09-24log: fix repeated invocation of vsnprintf()/vaprintf() in log_struct()Lennart Poettering
https://bugs.freedesktop.org/show_bug.cgi?id=55213
2012-09-19util: fix bad strstrip() return value in normalize_env_assignment()Lennart Poettering
https://bugzilla.redhat.com/show_bug.cgi?id=858780
2012-09-18core: move ManagerRunningAs to sharedZbigniew Jędrzejewski-Szmek
Note: I did s/MANAGER/SYSTEMD/ everywhere, even though it makes the patch quite verbose. Nevertheless, keeping MANAGER prefix in some places, and SYSTEMD prefix in others would just lead to confusion down the road. Better to rip off the band-aid now.
2012-09-16install: treat non-existent directory as emptyZbigniew Jędrzejewski-Szmek
When looking for symlinks, it doesn't make sense to error-out if the directory is missing. The user might delete an empty directory. This check caused test-unit-file to fail when run before installation.
2012-09-12test: extend unit-name test a bitLennart Poettering
2012-09-12unit-name: rework unit_name_replace_instance function()Lennart Poettering
https://bugzilla.redhat.com/show_bug.cgi?id=855863
2012-09-11when determining unit file list, include invalid unit names in an "invalid" ↵Lennart Poettering
state
2012-09-03journal: generate structured journal messages for a number of eventsLennart Poettering
2012-08-13namespace: rework namespace supportLennart Poettering
- don't use pivot_root() anymore, just reuse root hierarchy - first create all mounts, then mark them read-only so that we get the right behaviour when people want writable mounts inside of read-only mounts - don't pass invalid combinations of MS_ constants to the kernel
2012-07-22test: correct enum misassignmentZbigniew Jędrzejewski-Szmek
CC src/test/test_job_type-test-job-type.o ../src/test/test-job-type.c:40:25: warning: implicit conversion from enumeration type 'enum UnitType' to different enumeration type 'ServiceType' (aka 'enum ServiceType') [-Wconversion] .type = UNIT_SERVICE ^~~~~~~~~~~~
2012-07-15udev: get rid of TEST_PREFIX and use unshare() to fake /sys, /dev, /runKay Sievers
2012-06-25cryptsetup: fix escaping when generating cryptsetup unitsLennart Poettering
2012-06-22systemctl: automatically turn paths and unescaped unit names into proper ↵Lennart Poettering
unit names This makes sure that systemctl status /home is implicitly translated to: systemctl status /home.mount Similar, /dev/foobar becomes dev-foobar.device. Also, all characters that cannot be part of a unit name are implicitly escaped.
2012-05-31Revert "label: fix systemd-udev labeling of /run directory."Kay Sievers
This reverts commit 9b5af248f04b6cad8a5bca836e89a39e9f6823d9. Udev now explicitely labels only files/directories in /dev. The selinux array API is not released and will not work on other distros at this moment.
2012-05-31mkdir: append _label to all mkdir() calls that explicitly set the selinux ↵Kay Sievers
context
2012-05-31label: fix systemd-udev labeling of /run directory.Daniel J Walsh
systemd-udev is currently incorrectly labeling /run/udev/* content because it is using selinux prefix labeling of /dev. This patch will allow systemd-udev to use prefix labeling of /dev and /run.
2012-05-08util: split-out path-util.[ch]Kay Sievers
2012-04-25core: add NOP jobs, job type collapsingMichal Schmidt
Two of our current job types are special: JOB_TRY_RESTART, JOB_RELOAD_OR_START. They differ from other job types by being sensitive to the unit active state. They perform some action when the unit is active and some other action otherwise. This raises a question: when exactly should the unit state be checked to make the decision? Currently the unit state is checked when the job becomes runnable. It's more sensible to check the state immediately when the job is added by the user. When the user types "systemctl try-restart foo.service", he really intends to restart the service if it's running right now. If it isn't running right now, the restart is pointless. Consider the example (from Bugzilla[1]): sleep.service takes some time to start. hello.service has After=sleep.service. Both services get started. Two jobs will appear: hello.service/start waiting sleep.service/start running Then someone runs "systemctl try-restart hello.service". Currently the try-restart operation will block and wait for sleep.service/start to complete. The correct result is to complete the try-restart operation immediately with success, because hello.service is not running. The two original jobs must not be disturbed by this. To fix this we introduce two new concepts: - a new job type: JOB_NOP A JOB_NOP job does not do anything to the unit. It does not pull in any dependencies. It is always immediately runnable. When installed to a unit, it sits in a special slot (u->nop_job) where it never conflicts with the installed job (u->job) of a different type. It never merges with jobs of other types, but it can merge into an already installed JOB_NOP job. - "collapsing" of job types When a job of one of the two special types is added, the state of the unit is checked immediately and the job type changes: JOB_TRY_RESTART -> JOB_RESTART or JOB_NOP JOB_RELOAD_OR_START -> JOB_RELOAD or JOB_START Should a job type JOB_RELOAD_OR_START appear later during job merging, it collapses immediately afterwards. Collapsing actually makes some things simpler, because there are now fewer job types that are allowed in the transaction. [1] Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=753586
2012-04-17selinux: unify systemd and udev codeKay Sievers
2012-04-17udev: replace util_create_path() with mkdir_parents()Kay Sievers
2012-04-16udev: use startswith() and streq()Kay Sievers
2012-04-16udev: remove configuration options for /dev, /sys, /run directoriesKay Sievers
2012-04-14udev: test - move test/ and src/test/Kay Sievers
2012-04-12test: test tools should still be in the src/ directoryLennart Poettering