summaryrefslogtreecommitdiff
path: root/src/test/test-cgroup-util.c
Commit message (Collapse)AuthorAge
* Remove unnecessary casts in printfsZbigniew Jędrzejewski-Szmek2014-05-15
| | | | No functional change expected :)
* test: fix "make check"Lennart Poettering2014-02-12
| | | | | | | Let's remove the tests for cg_path_get_machine_name(), since they no longer operate solely on the cgroup path, but actually look up data in /run. Since we have a test for cg_pid_get_machine_name() this shouldn't be too much of a loss.
* bus: properly shift cgroup data returned from kdbus by the container's root ↵Lennart Poettering2013-12-24
| | | | before parsing
* Fix extraction of _SYSTEMD_USER_UNITZbigniew Jędrzejewski-Szmek2013-12-22
| | | | | Units from user services underneath user@.service would not be detected properly.
* journald: cache cgroup root path, instead of querying it on every incoming ↵Lennart Poettering2013-12-11
| | | | log message
* test: cgroup-util - do not fail if cpu controller is not availableKay Sievers2013-12-08
|
* test: Make testing work on systems without or old systemdHolger Hans Peter Freyther2013-08-22
| | | | | | | | | | | | | | * 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.
* cgroup: simplify how instantiated units are mapped to cgroupsLennart Poettering2013-07-11
| | | | | | | | | Previously for an instantiated unit foo@bar.service we created a cgroup foo@.service/foo@bar.service, in order to place all instances of the same template inside the same subtree. As we now implicitly add all instantiated units into one per-template slice we don't need this complexity anymore, and instance units can map directly to the cgroups of their full name.
* libsystemd-logind: fix detection of session/user/machine of a PIDLennart Poettering2013-07-02
|
* login: add an api to determine the slice a PID is located in to libsystemd-loginLennart Poettering2013-06-21
|
* logind: add infrastructure to keep track of machines, and move to slicesLennart Poettering2013-06-20
| | | | | | | | | | | | | | | | | | | | - This changes all logind cgroup objects to use slice objects rather than fixed croup locations. - logind can now collect minimal information about running VMs/containers. As fixed cgroup locations can no longer be used we need an entity that keeps track of machine cgroups in whatever slice they might be located. Since logind already keeps track of users, sessions and seats this is a trivial addition. - nspawn will now register with logind and pass various bits of metadata along. A new option "--slice=" has been added to place the container in a specific slice. - loginctl gained commands to list, introspect and terminate machines. - user.slice and machine.slice will now be pulled in by logind.service, since only logind.service requires this slice.
* core: add new .slice unit type for partitioning systemsLennart Poettering2013-06-17
| | | | | | | | | | | | In order to prepare for the kernel cgroup rework, let's introduce a new unit type to systemd, the "slice". Slices can be arranged in a tree and are useful to partition resources freely and hierarchally by the user. Each service unit can now be assigned to one of these slices, and later on login users and machines may too. Slices translate pretty directly to the cgroup hierarchy, and the various objects can be assigned to any of the slices in the tree.
* cgroup: when escaping a cgroup object name, also escape names that start ↵Lennart Poettering2013-05-03
| | | | with a dot
* cgls: add --machine/-MZbigniew Jędrzejewski-Szmek2013-05-01
| | | | | cg_get_machine_path is modified to include the escaped machine name + ".nspawn" if the machine argument is nonnull.
* cgroup: always validate cgroup controller namesLennart Poettering2013-04-24
| | | | Let's better be safe than sorry.
* cgroup: make sure all our cgroup objects have a suffix and are properly escapedLennart Poettering2013-04-22
| | | | | | | | | | | | | | Session objects will now get the .session suffix, user objects the .user suffix, nspawn containers the .nspawn suffix. This also changes the user cgroups to be named after the numeric UID rather than the username, since this allows us the parse these paths standalone without requiring access to the cgroup file system. This also changes the mapping of instanced units to cgroups. Instead of mapping foo@bar.service to the cgroup path /user/foo@.service/bar we will now map it to /user/foo@.service/foo@bar.service, in order to ensure that all our objects are properly suffixed in the tree.
* nspawn: suffix the nspawn cgroups with ".nspawn"Lennart Poettering2013-04-22
| | | | | | | | | | | As discussed with Dan Berrange it's a good idea to suffix all objects in the cgroup tree with ".something", so that when the system is partitioned using a resource management tool we can drop objects of different types into the same partition directory without generate namespace conflicts. We'l add this to the Pax Control Group document as soon as write access to the fdo wiki is restored.
* nspawn: introduce the new /machine/ tree in the cgroup tree and move ↵Lennart Poettering2013-04-16
| | | | | | | | | | | | | | containers there Containers will now carry a label (normally derived from the root directory name, but configurable by the user), and the container's root cgroup is /machine/<label>. This label is called "machine name", and can cover both containers and VMs (as soon as libvirt also makes use of /machine/). libsystemd-login can be used to query the machine name from a process. This patch also includes numerous clean-ups for the cgroup code.
* bus: handle env vars safelyLennart Poettering2013-04-15
| | | | | Make sure that our library is safe for usage in SUID programs when it comes to env var handling
* core/cgroup-util: simplify functions and add testsZbigniew Jędrzejewski-Szmek2013-01-18