1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 11:55:44 +03:00
Commit Graph

23072 Commits

Author SHA1 Message Date
Evgeny Vereshchagin
a8107a54bd test: add test for capability bounding set parsing 2015-10-29 14:48:32 +03:00
Lennart Poettering
2c80779e33 Merge pull request #1700 from ssahani/word
Port to extract_first_word
2015-10-28 19:32:35 +01:00
Lennart Poettering
7f610dee51 Merge pull request #1707 from dvdhrm/notify-prio
core: fix priority ordering in notify-handling
2015-10-28 19:31:37 +01:00
David Herrmann
b215b0ede1 core: fix priority ordering in notify-handling
Currently, we dispatch NOTIFY messages in a tight loop. Regardless how
much data is incoming, we always dispatch everything that is queued.
This, however, completely breaks priority event-handling of sd-event.
When dispatching one NOTIFY event, another completely different event
might fire, or might be queued by the NOTIFY handling. However, this
event will not get dispatched until all other further NOTIFY messages are
handled. Those might even arrive _after_ the other event fired, and as
such completely break priority ordering of sd-event (which several code
paths rely on).

Break this by never dispatching multiple messages. Just return after each
message that was read and let sd-event handle everything else.

(The patch looks scarier that it is. It basically just drops the for(;;)
 loop and re-indents the loop-content.)
2015-10-28 19:11:36 +01:00
Susant Sahani
6cbe4ed1e1 nspwan: port to extract_first_word 2015-10-28 22:59:01 +05:30
Susant Sahani
03da651313 install: port to extract_first_word 2015-10-28 22:58:24 +05:30
Susant Sahani
b1f48e3c94 journal-remote: port to extract_first_word 2015-10-28 22:57:59 +05:30
Lennart Poettering
c9643d5e8e Merge pull request #1705 from filbranden/testutil1
Move tests for extract-word and parse-util into separate test cases
2015-10-28 18:19:03 +01:00
Filipe Brandenburger
bb269eed0e test-parse-util: Move parse-util tests into their own test case
Tests for the functions defined in src/basic/parse-util.c. Reorder them
to match the order in which the functions are defined in the source
file. Adjusted the list of include files to remove the ones no longer
needed in test-util.c.

Tested that `make check` still passes as expected. Also checked the
number of lines removed from test-util.c matches the expected, as an
additional verification that no tests were dropped or duplicated in the
move.
2015-10-28 08:17:10 -07:00
Filipe Brandenburger
23a3c91617 test-extract-word: Move extract-word tests into their own test case
Tests for the functions defined in src/basic/extract-word.c.

Tested that `make check` still passes as expected.
2015-10-28 08:16:00 -07:00
Filipe Brandenburger
d8c3019b02 build-sys: Keep .gitignore sorted
Let's try to keep it that way! :-)
2015-10-28 08:15:49 -07:00
Lennart Poettering
8918103d1e Merge pull request #1703 from ronnychevalier/rc/test_execute_check_nobody2
test-execute: check if nobody exists before running some tests
2015-10-28 13:07:48 +01:00
Lennart Poettering
e3d285e6c0 Merge pull request #1699 from filbranden/cpuaffinity9
cpu-set-util: Support ranges in parse_cpu_set_and_warn (v4)
2015-10-28 13:06:56 +01:00
Ronny Chevalier
cc7fa4fb4a test-execute: check if nobody exists before running some tests 2015-10-28 11:51:37 +01:00
Daniel Mack
df5b3e1840 Merge pull request #1701 from hosiet/l10n-cn
l10n: add Simplified Chinese translation.
2015-10-28 10:23:36 +01:00
Boyuan Yang
e0c7a4e07d l10n: add zh_CN translation. 2015-10-28 16:40:41 +08:00
Filipe Brandenburger
71b1c27a40 man: Update man page documentation for CPUAffinity
Document support for commas as a separator and possibility of specifying
ranges of CPU indices.

Tested by regenerating the manpages locally and reading them on man.
2015-10-27 17:56:26 -07:00
Filipe Brandenburger
a26662ce9b cpu-set-util: Support ranges in parse_cpu_set_and_warn
Tested CPUAffinity ranges on both a service unit and in system.conf and
confirmed they work as expected (by inspecting /proc/PID/status, for the
main pid of the service and for pid 1).  Also mixed ranges with both
spaces, commas, trailing commas and spaces.

Added new tests to increase coverage of ranges and prevent regressions.
2015-10-27 17:56:26 -07:00
Filipe Brandenburger
28cb17ef02 parse-util: Introduce new parse_range function
This function will be useful for CPUAffinity settings that involve
ranges of CPUs.

Make it generic and include test coverage to prevent regressions.
2015-10-27 17:56:26 -07:00
Filipe Brandenburger
4fc66acb93 cpu-set-util: Accept commas as separators in parse_cpu_set_and_warn
Tested CPUAffinity settings on both a service unit and in system.conf
and confirmed they work as expected.

Added a new test to confirm that trailing commas and spaces work and to
prevent any regressions in that area.
2015-10-27 17:39:58 -07:00
Tom Gundersen
dc1e811ebd Merge pull request #1698 from poettering/pid-is-unwaited-fix
fixup for previous pr
2015-10-27 18:09:32 +01:00
Lennart Poettering
930d2838f2 service: exiting early is nicer than deeply-indented code blocks 2015-10-27 18:02:24 +01:00
Lennart Poettering
c386f58864 core: all unit types that watch control PIDs should use the same logic
When coldplugging the unit state, make sure to follow the same basic
logic for all unit types: always verify whether the control PID is still
a waitable process before proceeding.
2015-10-27 17:59:45 +01:00
Lennart Poettering
76583ef261 core: don't pass uninitialzed PIDs to pid_is_unwaited()
Since 5fd9b2c546 passing a pid of 0 to
pid_is_unwaited() and pid_is_live() is considered as a request on the
current process, similar how the other calls in process-util.c handle a
PID of 0. This broke service.c, which passes a 0 PID and expects it to
be considered an unwaited process.

This fix make sure we can boot again.
2015-10-27 17:56:12 +01:00
Lennart Poettering
64529a2921 Merge pull request #1695 from evverx/fix-cap-bounding-merging
core: fix CapabilityBoundingSet merging
2015-10-27 17:09:05 +01:00
Tom Gundersen
0d06968129 Merge pull request #1691 from poettering/util-lib-3
split up util.h and macro.h into even more bits
2015-10-27 16:55:16 +01:00
Lennart Poettering
7760171904 util-lib: move inotify-related definitions to fs-util.[ch] 2015-10-27 14:58:05 +01:00
Lennart Poettering
4fee397531 util-lib: move fdname_is_valid() to fd-util.[ch] 2015-10-27 14:57:44 +01:00
Lennart Poettering
3f2c0becc3 automount: move generically userful call repeat_mount() into mount-util.[ch] 2015-10-27 14:25:58 +01:00
Lennart Poettering
7b3e062cb6 process-util: move a couple of process-related calls over 2015-10-27 14:24:58 +01:00
Lennart Poettering
5fd9b2c546 process-util: make some minor corrections to PID live detection 2015-10-27 14:02:45 +01:00
Lennart Poettering
6bc73acb01 process-util: rename get_parent_of_pid() → get_process_ppid()
In order to match the other get_process_xyz() calls.
2015-10-27 14:01:48 +01:00
Lennart Poettering
405f8907b9 process-util: actually move rename_process() over
The prototype was moved long ago, actually move the definition over now,
too.
2015-10-27 13:56:40 +01:00
Lennart Poettering
4e036b7a96 mount-util: move fstype_is_network() and name_to_handle_at() definitions over 2015-10-27 13:45:53 +01:00
Lennart Poettering
5e524b404b update TODO 2015-10-27 13:45:53 +01:00
Lennart Poettering
b5efdb8af4 util-lib: split out allocation calls into alloc-util.[ch] 2015-10-27 13:45:53 +01:00
Lennart Poettering
7d50b32a12 util-lib: split out globbing related calls into glob-util.[ch] 2015-10-27 13:25:58 +01:00
Lennart Poettering
872a590ef8 stat-util.h: move F_TYPE_EQUAL() macro definition to stat-util.h 2015-10-27 13:25:58 +01:00
Lennart Poettering
15a5e95075 util-lib: split out printf() helpers to stdio-util.h 2015-10-27 13:25:57 +01:00
Lennart Poettering
c7f1808add macro.h: move definition of MODE_INVALID to parse-util.h 2015-10-27 13:25:57 +01:00
Lennart Poettering
0d1dbeb3a4 macro: move DECIMAL_STR_WIDTH() into macro.h
So that it sets next to DECIMAL_STR_MAX(), where it belongs.
2015-10-27 13:25:57 +01:00
Lennart Poettering
8f328d36c9 socket-util: move CMSG_FOREACH() from macro.h to socket-util.h 2015-10-27 13:25:57 +01:00
Lennart Poettering
afc5dbf37f io-util.h: move iovec stuff from macro.h to io-util.h 2015-10-27 13:25:57 +01:00
Lennart Poettering
ceee6d3a44 process-util: move PID related macros from macro.h to process-util.h 2015-10-27 13:25:57 +01:00
Lennart Poettering
ee104e11e3 user-util: move UID/GID related macros from macro.h to user-util.h 2015-10-27 13:25:57 +01:00
Lennart Poettering
49cf4170d0 util-lib: move web-related calls into web-util.[ch] 2015-10-27 13:25:57 +01:00
Lennart Poettering
7ccbd1ae84 util-lib: split out syslog-related calls into syslog-util.[ch] 2015-10-27 13:25:57 +01:00
Lennart Poettering
d21be5ff91 detect-virt: add new --chroot switch to detect chroot() environments 2015-10-27 13:25:57 +01:00
Lennart Poettering
7f4b3c5ea3 util-lib: move running_in_chroot() into virt.[ch]
It's a very weak kind of virtualization, after all.
2015-10-27 13:25:57 +01:00
Lennart Poettering
4e731273ed util-lib: move /proc/cmdline parsing code to proc-cmdline.[ch] 2015-10-27 13:25:57 +01:00