Luca Boccassi
a557e61993
Merge pull request #22804 from mrc0mmand/test-tweaks
...
A couple of TEST-69 tweaks
2022-03-21 20:05:06 +00:00
Lennart Poettering
f5d0f21c37
update TODO
2022-03-21 18:17:04 +01:00
Frantisek Sumsal
1b87ca4fe9
test: use a dropin to override the end.service unit
...
instead of removing it.
2022-03-21 16:41:49 +01:00
Frantisek Sumsal
3fe2885cc5
test: run test-shutdown.py in verbose mode
...
To make the debugging of spurious fails a bit easier.
2022-03-21 16:13:09 +01:00
Frantisek Sumsal
c3d83ff940
test: don't try to execute a non-existing script
2022-03-21 15:55:49 +01:00
Luca Boccassi
7659e52397
Merge pull request #22798 from keszybz/test-output-narrow-and-timeouts
...
Increase timeout for a flaky test and make test names shorter to avoid line wrapping in output
2022-03-21 14:13:22 +00:00
Luca Boccassi
02036ca7e9
Merge pull request #22799 from keszybz/man-spelling-and-crosslinks
...
Typos and more internal links in documentation
2022-03-21 13:40:03 +00:00
Zbigniew Jędrzejewski-Szmek
9b01798b98
basic/strv: avoid potential UB with references to array[-1]
...
"""
Given an array a[N] of N elements of type T:
- Forming a pointer &a[i] (or a + i) with 0 ≤ i ≤ N is safe.
- Forming a pointer &a[i] with i < 0 or i > N causes undefined behavior.
- Dereferencing a pointer &a[i] with 0 ≤ i < N is safe.
- Dereferencing a pointer &a[i] with i < 0 or i ≥ N causes undefined behavior.
"""
As pointed by by @medhefgo, here we were forming a pointer to a[-1]. a itself
wasn't NULL, so a > 0, and a-1 was also >= 0, and this didn't seem to cause any
problems. But it's better to be formally correct, especially if we move the
code to src/fundamental/ later on and compile it differently.
Compilation shows no size change (with -O0 -g) on build/systemd, so this should
have no effect whatsoever.
2022-03-21 13:48:00 +01:00
Zbigniew Jędrzejewski-Szmek
e7949be790
Drop unused variables to fix build
...
This is a merge conflict between #22740 and #20156 .
2022-03-21 13:30:42 +01:00
Zbigniew Jędrzejewski-Szmek
a0aa38389d
man: cross-link to BLS in more places, use "Type #1 ", "Type #2 " as appropriate
2022-03-21 12:16:54 +01:00
Zbigniew Jędrzejewski-Szmek
c3fb1e43c1
spelling: weekday names are capitalized
2022-03-21 12:16:54 +01:00
Zbigniew Jędrzejewski-Szmek
7ff9846956
Merge pull request #20156 from poettering/sysupdate
...
new "systemd-sysupdate" component
2022-03-21 12:06:48 +01:00
Zbigniew Jędrzejewski-Szmek
57ff888f9f
test-nss-host: increase timeout
...
With my crappy home network the test takes 29.5s usually. But with any
tiny slowdown, it goes above the 30s limit and fails. Let's bump the
timeout to avoid spurious failures.
2022-03-21 11:43:47 +01:00
Zbigniew Jędrzejewski-Szmek
8e1fc5d939
fuzz: rename fuzz-dhcp-server-relay-message to fuzz-dhcp-server-relay
...
We can only relay messages, so we can make the name shorter without
losing informational value. This makes meson test output look better.
2022-03-21 11:43:47 +01:00
Zbigniew Jędrzejewski-Szmek
8e2131bfae
fuzz: rename the longest test samples
...
"meson test" uses a test name generated from the file name and those long names
cause the test log output to exceed terminal width which looks bad. Let's replace
some long names with more-meaningful names that actually say something about
the tests.
2022-03-21 11:42:35 +01:00
Zbigniew Jędrzejewski-Szmek
b0a5e59622
Merge pull request #22740 from yuwata/list
...
tree-wide: declare iterator of LIST_FOREACH() in the loop
2022-03-21 10:52:03 +01:00
Yu Watanabe
59b8e67582
Merge pull request #22789 from poettering/timesync-struct-log
...
timesyncd: various refactorings and cleanup + structured log msg on first sync
2022-03-21 02:26:59 +09:00
Andrea Pappacoda
6725a64f6e
po: fix "sistemd" typo in it.po
...
Also use "ricaricare" instead of "riavviare" for "reload"
2022-03-20 09:47:33 +01:00
Yu Watanabe
de010b0b2e
strv: make iterator in STRV_FOREACH() declaread in the loop
...
This also avoids multiple evaluations in STRV_FOREACH_BACKWARDS()
2022-03-19 08:33:33 +09:00
Lennart Poettering
178d3ff2aa
update TODO
2022-03-19 00:14:55 +01:00
Lennart Poettering
7910ec3bcd
test: add integration test for sysupdate
2022-03-19 00:13:55 +01:00
Lennart Poettering
436aa3b16f
man: add sysupdate documentation
2022-03-19 00:13:55 +01:00
Lennart Poettering
4a05d7ed72
unit: add units for new "systemd-sysupdate" tool
...
These unit (if enabled) will try to update the OS in regular intervals.
Moreover, every day in the early morning this will attempt to reboot the
system if there's a newer version installed than running.
2022-03-19 00:13:55 +01:00
Lennart Poettering
43cc7a3ef4
sysupdate: add new component "sysupdate"
2022-03-19 00:13:55 +01:00
Yu Watanabe
80a226b26b
list: make LIST_FOREACH() and LIST_FOREACH_BACKWARDS() safer
2022-03-19 08:10:29 +09:00
Yu Watanabe
03677889f0
list: declare iterator of LIST_FOREACH() in the loop
2022-03-19 08:10:29 +09:00
Lennart Poettering
922a650829
timesyncd: improve log message whe getting a reply from server
...
The message is misleading: it's not about synchronization but about
successful communicaiton. And it's not about "initial", but only about
first contact since we siwtched to this server.
Let's hence reword the message a bit.
2022-03-18 23:54:18 +01:00
Lennart Poettering
b016e77efd
timesyncd: generate a structure log message the first time we set the clock correctly
...
Usecase: later on we can use this to retroactively adjust log output in
journalctl or similar on systems lacking an RTC: we just have to search
for this sructured log message that indicates the first sync point and
can then retroactively adjust the incorrect timestamps collected before
that.
2022-03-18 23:54:05 +01:00
Lennart Poettering
1aa7ca2241
timesyncd: add debug logging in case we can't touch /run/systemd/timesync/synchronized
2022-03-18 23:54:01 +01:00
Lennart Poettering
1f129b7fb7
timesyncd: when updating timestamp file, use best time we know, instead of system clock
...
We adjust the system clock slowly after all, even if we know a more
accurate time. Use the accurate time for the timestamp.
2022-03-18 23:53:58 +01:00
Lennart Poettering
87057128e6
timesyncd: rename bool 'good' → 'talking'
...
THe name is just too generic. Let's pick a name that makes clear that
this is about successful communication.
2022-03-18 23:53:54 +01:00
Lennart Poettering
20c1a21066
timesyncd: don't abort packet handling if we can't save the timestamp to disk
...
This should not be a fatal error, and it isn't in the other place we
call this.
2022-03-18 23:53:50 +01:00
Lennart Poettering
ec75e8e07a
sd-event: add a single implementation of an event source that runs on clock changes
...
We basically had the same code in three places. Let's unify it in a
common helper function.
event_add_time_change() might be something we should add to the official
sd-event API sooner or later, given its general usefulness.
2022-03-18 23:53:34 +01:00
Lennart Poettering
7cb08ea80f
timesyncd: move stuff that is not about setting the clock out of manager_adjust_clock()
...
Let's make sure manager_adjust_clock() is purely about setting the
clock, and nothing else.
Let's clean up logging this way. manager_adjust_clock() now won#t log
about errors, but the caller can safely do that, and do with the right
log message string.
2022-03-18 23:53:31 +01:00
Lennart Poettering
adc07c2bf5
timesyncd: use CMSG_FIND_DATA() macro where appropriate
2022-03-18 23:53:27 +01:00
Lennart Poettering
5ba674cca5
timesyncd: merge some variable declarations
2022-03-18 23:53:24 +01:00
Lennart Poettering
9a8b43021b
timesyncd: rebreak some comments
2022-03-18 23:53:20 +01:00
Lennart Poettering
0fd08026f8
timesyncd: add comment what bool arg is
2022-03-18 23:53:17 +01:00
Lennart Poettering
853efc39ea
timesyncd: make a constant structure actually static/const
2022-03-18 23:53:13 +01:00
Lennart Poettering
c696878ac0
timesyncd: cast some function invocations to void
2022-03-18 23:53:09 +01:00
Lennart Poettering
aabda4f3e0
timesyncd: get rid of unnecessary 'r' assignments
2022-03-18 23:53:06 +01:00
Lennart Poettering
40c6b5143b
timesyncd: use structured initialization more
2022-03-18 23:52:36 +01:00
Zbigniew Jędrzejewski-Szmek
40f35786b0
various: make parse_env_file error handling the same in various places
...
No big reason to do this, except that I was looking at all call sites
and it's nicer if the same style is used accross the codebase.
2022-03-18 23:26:59 +01:00
Jan Janssen
592d576552
boot: Draw unicode separator line for status messages
2022-03-18 19:33:13 +01:00
Zbigniew Jędrzejewski-Szmek
5f1077af1e
Merge pull request #22519 from poettering/boot-order-title-revert
...
sd-boot: rework boot entry sorting
2022-03-18 19:04:48 +01:00
Yu Watanabe
d0b4f13ef8
strv: use STRV_FOREACH() at two more places
2022-03-18 18:38:08 +01:00
Yu Watanabe
9eb814818d
strv: rewrite strv_copy() with cleanup attribute and STRV_FOREACH()
2022-03-18 18:36:48 +01:00
Lennart Poettering
52bb308c13
time-util: add macros around timespec_store() that operates on compund literal allocated timespec struct
...
This way we can convert usec_t to timespec on-the-fly, without a buffer.
No actual behaviour change just some shortening of code.
2022-03-18 17:13:36 +01:00
Nishal Kulkarni
de0988f9d2
shell-completion: Add completion for oomctl
...
Added bash and zsh completions for oomctl arguments and commands.
Related To: #22118
2022-03-18 13:41:19 +00:00
Lennart Poettering
7d469b63a1
Merge pull request #22787 from poettering/bootspec-split
...
shared: split bootspec.c in two
2022-03-18 14:22:07 +01:00