Commit Graph
58613 Commits
Author SHA1 Message Date
Yu Watanabe 37611ccb19 test-network: use wait_operstate() at one more place 2022-07-09 12:20:11 +09:00
Yu Watanabe 894ff7d1ab test-network: suppress periodic output in wait_operstate() 2022-07-09 12:19:52 +09:00
Yu Watanabe 163d095fc3 test-network: disable debugging logs from networkctl, resolvectl, and so on 2022-07-09 12:19:20 +09:00
Yu Watanabe 589af70b87 test-network: merge two DHCPv6 client tests 2022-07-09 11:44:25 +09:00
Yu Watanabe 4b31fc88ac test-network: replace sleep with wait_address() and wait_address_dropped() 2022-07-09 11:44:25 +09:00
Yu Watanabe 0730e3767d test-network: merge two more tests with test_dhcp_client_ipv4_only 2022-07-09 11:44:25 +09:00
Yu Watanabe 3d8e0aa2de test-network: merge tests for UseDNS= 2022-07-09 11:44:25 +09:00
Yu Watanabe 2d7a594fee test-network: merge two IPv4LL tests 2022-07-09 11:44:25 +09:00
Yu Watanabe 15519a81ac test-network: drop test_dhcp_client_ipv4_ipv6
As the test is covered by test_dhcp_client_reuse_address_as_static.
2022-07-09 11:44:25 +09:00
Yu Watanabe 3857d367f0 sd-dhcp-client: fix log message 2022-07-09 11:44:25 +09:00
Yu Watanabe 2b6a24a602 test-network: check DHCPv4 address in more detail
Also, this drops redundant address check through networkctl.
2022-07-09 11:44:25 +09:00
Yu Watanabe e81083f2d8 test-network: drop 25-dhcp-v4-server-veth-peer.network 2022-07-09 11:44:25 +09:00
Yu Watanabe b17947d9cf test-network: drop meaningless test
On DHCPv6 lease renew, the kernel do not drop static routes, and hence
we do not try to reassign them. Hence, the test is mostly meaningless.
2022-07-09 11:44:25 +09:00
Yu Watanabe 063c7e9b13 test-network: introduce read_dnsmasq_log_file() helper function
This reduces the number of times that the log file is read.
Also, dropped unnecessary dump of the log file.
2022-07-09 11:44:25 +09:00
Yu Watanabe a102a52c34 test-network: shorten sleep time a bit
Network interfaces will be ready after lease is acquired.
Hence, it is not necessary to wait more than lease time.
2022-07-09 11:44:25 +09:00
Yu Watanabe 1a8e1d7853 test-network: introduce read_link_state_file() helper function 2022-07-09 11:44:21 +09:00
Yu Watanabe d5ad2ec1d4 network: drop redundant warning
If file is world readable, then `read_full_file_full()` will warn
about that.
2022-07-09 01:09:23 +01:00
Luca Boccassi b2e8f2d853 Merge pull request #23940 from yuwata/core-extract-first-word
core: fix error value in log_syntax()
2022-07-09 01:09:06 +01:00
Luca Boccassi 89f119b654 Merge pull request #23731 from bluca/bootctl_image
bootctl: add --root and --image
2022-07-08 21:59:16 +01:00
Evgeny Vereshchagin 686a0d387d Merge pull request #23954 from yuwata/resolve-overflow
resolve: fix heap-buffer-overflow
2022-07-08 23:39:31 +03:00
Yu Watanabe d38655d792 core/cgroup: drop unnecessary else 2022-07-09 03:37:43 +09:00
Yu Watanabe fe1ed553b3 core: shorten code a bit 2022-07-09 03:37:43 +09:00
Yu Watanabe 6a35d52d78 core/load-fragment: fix error value in log_syntax()
`extract_first_word()` may return positive value on success.
2022-07-09 03:36:58 +09:00
Yu Watanabe 9d9fd4ad0a test: start test user session before idle action setting is changed
Otherwise, idle action may be triggered before starting the test user
session.

This also introduce create_session() and cleanup_session() helper
functions.

Fixes #23952.
2022-07-08 16:14:38 +00:00
Luca Boccassi d5bf74f9e2 Update TODO 2022-07-08 16:59:51 +01:00
Luca Boccassi 02d06ba180 bootctl: add --install-source=auto|image|host
When using --root=/--image= the binaries to install/update will be
picked from the directory/image. Add an option to let the caller
choose.
By default (auto) the image is tried first, and if nothing is found
then the host. The other options allow to strictly try the image
or host and ignore the other.
2022-07-08 16:58:51 +01:00
Luca Boccassi 80a2381d5c bootctl: add --root and --image
Operate on image/directory, and also take files to install from it
2022-07-08 16:58:15 +01:00
Lennart Poettering 03bc11d1c4 mac: rework labelling code to be simpler, and less racy
This merges the various labelling calls into a single label_fix_full(),
which can operate on paths, on inode fds, and in a dirfd/fname style
(i.e. like openat()). It also systematically separates the path to look
up in the db from the path we actually use to reference the inode to
relabel.

This then ports tmpfiles over to labelling by fd. This should make the
code a bit less racy, as we'll try hard to always operate on the very
same inode, pinning it via an fd.

User-visibly the behaviour should not change.
2022-07-08 17:43:49 +02:00
Lennart Poettering 05c4affe04 tmpfiles: take error code from "errno" earlier
This uses RET_NERRNO to more quickly pull the error code we see into
"r" out of "errno".

This does not change anything really. The only reason to do this is
because it is harder to break this accidentally. The thing is that
"errno" is easily set as side-effect of arbitrary functions. Thus, if we
rely on it being set for long code paths, we need to make carefully sure
that no code in between calls any function that might corrupt it as
side-effect. As far as I can see we did get this right. Nonetheless, I
think we should just store the value in "r" instead, to make it easier
to maintain this in the long run, if more code is inserted one day, who
knows.
2022-07-08 16:11:20 +02:00
Lennart Poettering 979055ba73 Merge pull request #23946 from poettering/tmpfiles-extrat-dir-fn
tmpfiles: port from basename()/dirname() → path_extract_direcory()/path_extract_filename()
2022-07-08 16:10:42 +02:00
Lennart Poettering ebbbf44ab9 mkdir-label: don't use mkdirat_errno_wrapper() without reason
mkdirat_errno_wrapper(x,y,z) is identical to RET_NERRNO(mkdirat(x, y,
z)). Let's always use the latter when we can, because easier to read,
shorter.

The only reason to have mkdirat_errno_wrapper() at all is so that we can
pass a function pointer to it around. Otherwise, let's not use it.
2022-07-08 16:10:26 +02:00
Yu Watanabe 9102c625a6 time-util: fix buffer-over-run
Fixes #23928.
2022-07-08 16:09:46 +02:00
Lennart Poettering ef8304de53 smack: catch more types of 'not supported' errors 2022-07-08 16:09:27 +02:00
Lennart Poettering 2f3745dd26 tmpfiles: shorten code a bit 2022-07-08 16:09:06 +02:00
Yu Watanabe 370999c05b resolve: fix possible integer overflow 2022-07-08 22:13:24 +09:00
Yu Watanabe 18f2638f48 test-network: merge DHCP client tests to improve performance 2022-07-08 13:04:02 +00:00
Yu Watanabe beeab352de resolve: fix heap-buffer-overflow reported by ASAN with strict_string_checks=1
Fixes #23942.
2022-07-08 22:01:02 +09:00
Zbigniew Jędrzejewski-Szmek 4707ffa8a3 Merge pull request #23943 from poettering/tmpfiles-errno-fix
two errno variable fixes
2022-07-08 14:50:18 +02:00
Lennart Poettering 4609d3bb07 tmpfiles: port from dirname/basename to path_extract_directory/filename()
let's use our better, newer internal APIs for these purposes. This gets us
two things: safer handling when the root dir is specified, and better
handling of paths with trailing slashes, as we can refuse them whenever
a directory is not acceptable.
2022-07-08 11:35:13 +02:00
Lennart Poettering 70980a39b8 path-util: NULL strings are definitely not valid paths
Let's make this functions that check validity of paths a bit more
friendly towards one specific kind of invalid path: a NULL pointer.

This follows similar logic in path_is_valid(), path_is_normalized() and
so on.
2022-07-08 11:35:00 +02:00
Lennart Poettering b467422bd2 update TODO 2022-07-08 11:19:39 +02:00
Lennart Poettering 149e0ca6c7 tmpfiles: correct error variable to use 2022-07-08 10:41:19 +02:00
Lennart Poettering 1ce268c789 namespace: fix propagated error number 2022-07-08 10:40:40 +02:00
Frantisek Sumsal 8db5bc589a Merge pull request #23941 from yuwata/test-60-improve-performance
test: performance improvement for TEST-60
2022-07-08 07:24:52 +00:00
Yu Watanabe 74af762551 test: use timeout command to improve performance
c.f. #23723.
2022-07-08 07:02:13 +09:00
Yu Watanabe d64c7623ab test: remove /failed and /testok before running test script 2022-07-08 07:00:02 +09:00
Yu Watanabe 0d6217efc1 Merge pull request #23937 from mrc0mmand/test-tweaks
Several ASan-related test suite tweaks
2022-07-08 06:25:57 +09:00
Yu Watanabe cd34a381ba Merge pull request #23939 from mrc0mmand/TEST-70-fix-cleanup
Fix cleanup in TEST-70-TPM2
2022-07-08 05:44:12 +09:00
Frantisek Sumsal 8fec14a7d3 test: use PBKDF2 with capped iterations instead of Argon2
to reduce the amount of resources the test needs (similarly to TEST-24
where we do the same thing).
2022-07-07 20:54:41 +02:00
Frantisek Sumsal 1e42972958 test: make TEST-64 a bit more ASan friendly
Reduce the number of iterations in some of the test cases, since they
generate a huge amount of uevents and basically DoS udev (which can't
keep up while being slowed down by ASan). To avoid this, let's reduce
the number of iterations and bump the timeout when running under ASan,
since we're not interested in performance in such cases.
2022-07-07 20:54:41 +02:00