Commit Graph

16 Commits

Author SHA1 Message Date
Yu Watanabe 2940b12826 test: use for(;;) instead of while(true) 2020-11-27 14:35:20 +09:00
Yu Watanabe 95ca39f04e oom: use CMP() macro 2020-11-27 14:35:20 +09:00
Christian Hesse 2bb703e440 oom: fix oomd.conf install location
The file is read in pkgsysconfdir, so install it there.
2020-11-27 09:03:18 +09:00
Anita Zhang 6ace20b971 test-oomd-util: remove memory_pressure == 0 checks
test_oomd_cgroup_context_acquire_and_insert reads the live cgroup data used
by the unit test. Under certain conditions, the memory pressure for the cgroup
can be non-zero (although most of the time it is 0 since these tests don't
generate much pressure).

Since these values are too dependent on the state of the system, remove the
checks. The type used is always >= 0 and test-psi-util already unit tests that
PSI values are parsed correctly from files so this test is redundant anyways.
2020-11-17 10:08:32 +01:00
Jörg Thalheim d7aa78c32f meson: add option to skip installing to $sysconfdir
This is useful for development where overwriting files out side
the configured prefix will affect the host as well as stateless
systems such as NixOS that don't let packages install to /etc but handle
configuration on their own.

Alternative to https://github.com/systemd/systemd/pull/17501

tested with:

$ mkdir inst build && cd build
$ meson \
  -Dcreate-log-dirs=false \
  -Dsysvrcnd-path=$(realpath ../inst)/etc/rc.d \
  -Dsysvinit-path=$(realpath ../inst)/etc/init.d \
  -Drootprefix=$(realpath ../inst) \
  -Dinstall-sysconfdir=false \
  --prefix=$(realpath ../inst) ..
$ ninja install
2020-11-12 11:21:46 +01:00
Yu Watanabe db9ecf0501 license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
Anita Zhang 532855bead oomd: make start up swap check more robust 2020-10-22 17:04:26 -07:00
Anita Zhang 018b6f4548 oomd: use ERRNO_IS_NOT_SUPPORTED and ERRNO_IS_PRIVILEGE 2020-10-21 22:37:30 -07:00
Anita Zhang 349a2003fd oomd: simplify if/else error check 2020-10-19 02:46:07 -07:00
Anita Zhang 3e9b4f9156 oomd: fix unit test when xattrs not supported 2020-10-16 16:19:15 -07:00
Zbigniew Jędrzejewski-Szmek c9a00f5a3b oomd: add names to dbus parameters and implement --bus-introspection 2020-10-15 15:03:49 +02:00
Zbigniew Jędrzejewski-Szmek ddc543bed8 oomd: check number of arguments, add --version, fix indentation 2020-10-15 15:03:07 +02:00
Anita Zhang 87e2bafff9 systemd-oomd: service files 2020-10-07 17:12:24 -07:00
Anita Zhang 5c616ecfcd systemd-oomd: dbus hook ups and oomctl CLI 2020-10-07 17:12:24 -07:00
Anita Zhang 9de5e32136 systemd-oomd: manager/daemon 2020-10-07 17:12:24 -07:00
Anita Zhang 61ff7397d0 systemd-oomd: unit testable helper functions
Helpers used by the systemd-oomd daemon to read/fill in various contexts and
make detection and kill decisions.

i.e. a simplified/less configurable version of
https://github.com/facebookincubator/oomd/tree/master/src/oomd.
2020-10-07 17:12:22 -07:00