summaryrefslogtreecommitdiff
path: root/src/test/test-sched-prio.c
AgeCommit message (Collapse)Author
2015-11-16tree-wide: sort includesThomas Hindoe Paaboel Andersen
Sort the includes accoding to the new coding style.
2015-09-04tests: Skip tests which need to access /sys/fs/cgroup if that is not availableMartin Pitt
Commit efdb023 ("core: unified cgroup hierarchy support") introduced a new error ENOEXEC in cg_unified() if /sys/fs/cgroup/ is not available. Adjust the "skip" checks in various tests accordingly. Add a corresponding "skip" check to test-bus-creds as well, as sd_bus_creds_new_from_pid() now calls cg_unified() as well. This re-fixes "make check" in build chroots without /sys/fs/cgroup. https://github.com/systemd/systemd/issues/1132
2015-05-11core: rename SystemdRunningAs to ManagerRunningAsLennart Poettering
It's primarily just a property of the Manager object after all, and we try to refer to PID 1 as "manager" instead of "systemd", hence let's to stick to this here too.
2014-10-12tests: fix some tests to pass in kojiZbigniew Jędrzejewski-Szmek
FAIL: test-engine ================= Cannot find cgroup mount point: No such file or directory Assertion 'r >= 0' failed at ../src/test/test-engine.c:46, function main(). Aborting. FAIL: test-sched-prio ===================== Cannot find cgroup mount point: No such file or directory Assertion 'r >= 0' failed at ../src/test/test-sched-prio.c:42, function main(). Aborting. FAIL: test-bus-cleanup ====================== Assertion 'sd_bus_open_system(&bus) >= 0' failed at ../src/libsystemd/sd-bus/test-bus-cleanup.c:40, function test_bus_open(). Aborting. after new: refcount 1
2014-10-04test: only use assert_seThomas Hindoe Paaboel Andersen
The asserts used in the tests should never be allowed to be optimized away
2014-07-20test-engine: fix access to unit load pathZbigniew Jędrzejewski-Szmek
Also add a bit of debugging output to help diagnose problems, add missing units, and simplify cppflags. Move test-engine to normal tests from manual tests, it should now work without destroying the system.
2014-02-19make gcc shut upLennart Poettering
If -flto is used then gcc will generate a lot more warnings than before, among them a number of use-without-initialization warnings. Most of them without are false positives, but let's make them go away, because it doesn't really matter.
2013-12-10fix scan-build issuesThomas Hindoe Paaboel Andersen
The static analyzer scan-build had a few issues with analysing parts of systemd. gpt-auto-generator.c: scan-build could not find blkid.h. Whether it should be blkid.h or blkid/blkid.h seems to depend on the version used. We already use blkid/blkid.h in udev-builtin-blkid.c so it seems safe to use that here too. Makefile.am: Moved some -D's from CFLAGS to CPPFLAGS. I also simplified them a bit and got rid of a left over DBUS_CFLAGS. test-cgroup-mask.c/test-sched-prio.c A variable was added to store the replaced TEST_DIR. When wrapped in an assert_se TEST_DIR was not replaced in the logged error. While not an issue introduced in this patch we might as well fix it up while we are here.
2013-11-30core: allocate a kdbus bus for each systemd instance, if we canLennart Poettering
2013-11-22test: test-sched-prio - skip if XDG_RUNTIME_DIR is not setKay Sievers
================================= No control group support available, not creating root group. Failed to determine XDG_RUNTIME_DIR Assertion 'r >= 0' failed at src/test/test-sched-prio.c:42, function main(). Aborting. =================================
2013-11-20test: exit early if we would conflict with running user systemdLennart Poettering
2013-07-18tests: skip tests when executed without privileges but which require themKay Sievers
2013-07-12test-path-util,test-sched-prio: uninitialize manager to appease valgrindZbigniew Jędrzejewski-Szmek
2013-07-10core: serialize/deserialize bus subscribersLennart Poettering
2013-03-26tests: skip bus test if bus cannot be openedZbigniew Jędrzejewski-Szmek
To make the result more visible, special return value is used to tell automake that the test was skipped. While at it, use the same return value in other skipped tests.
2013-02-06tests: skip tests if manager cannot be createdZbigniew Jędrzejewski-Szmek
When running without a user session, tests fail.
2013-02-06tests: run manager in session modeZbigniew Jędrzejewski-Szmek
False positives pop up otherwise. FAIL: test-unit-name (exit: 134) ================================ Failed to open /dev/tty0: Permission denied Failed to create root cgroup hierarchy: Permission denied Assertion 'manager_new(SYSTEMD_SYSTEM, &m) == 0' failed at src/test/test-unit-name.c:125, function test_unit_printf(). Aborting.
2012-11-15sched: Only setting CPUSchedulingPriority=rr doesn't workHolger Hans Peter Freyther
A service that only sets the scheduling policy to round-robin fails to be started. This is because the cpu_sched_priority is initialized to 0 and is not adjusted when the policy is changed. Clamp the cpu_sched_priority when the scheduler policy is set. Use the current policy to validate the new priority. Change the manual page to state that the given range only applies to the real-time scheduling policies. Add a testcase that verifies this change: $ make test-sched-prio; ./test-sched-prio [test/sched_idle_bad.service:6] CPU scheduling priority is out of range, ignoring: 1 [test/sched_rr_bad.service:7] CPU scheduling priority is out of range, ignoring: 0 [test/sched_rr_bad.service:8] CPU scheduling priority is out of range, ignoring: 100