Yu Watanabe
760971125d
test: make TEST-58-REPART support nspawn
2022-08-22 17:00:38 +02:00
Yu Watanabe
2b21522e82
test: merge test-repart.sh and TEST-58-REPART
2022-08-22 17:00:38 +02:00
Yu Watanabe
5996f11679
test: modernize TEST-58-REPART
2022-08-22 17:00:38 +02:00
Yu Watanabe
655eb07391
gpt: fix alignment
2022-08-22 17:00:38 +02:00
Yu Watanabe
4565246911
gpt: fix native uuids for s390x
...
__s390__ is defined for both s390 and s390x. Hence, we need to define
the native uuids for s390x at first.
2022-08-22 17:00:38 +02:00
Yu Watanabe
400e3d21f8
udev: fix inversed inequality for timeout of retrying event
...
Follow-up for 5d354e525a .
2022-08-22 17:00:38 +02:00
Yu Watanabe
695cfd53fe
repart: drop doubled space
2022-08-22 17:00:38 +02:00
Yu Watanabe
1283eea8f4
test: add test case for chassis type
2022-08-22 19:26:31 +09:00
Yu Watanabe
471fdebfde
hostname: make chassis type actually obtained from ACPI when nothing from DMI
...
Fixes a bug introduced by 8c8b1800e9 .
Fixes #24384 .
2022-08-22 13:38:26 +09:00
Yu Watanabe
645deddbaf
Merge pull request #24378 from yuwata/test-network-issue-24377
...
test-network: add test case for issue #24377
2022-08-20 22:24:53 +09:00
Yu Watanabe
b249834bc3
test-network: add test for issue #24377
...
The issue has been already fixed by
b05e52000b (PR #24020 ).
2022-08-20 20:50:02 +09:00
Yu Watanabe
5bd2a7c580
test-network: add helper functions for reading logs of networkd
2022-08-20 20:35:18 +09:00
Yu Watanabe
0f27758ae9
Merge pull request #24356 from keszybz/sd-netlink-api
...
Small improvements to the sd-netlink api
2022-08-20 19:11:02 +09:00
Yu Watanabe
1af39ef2f6
test: wait for whole block device instead of partition
...
In 'udevadm lock' the device /dev/loopX is locked instead of
/dev/loopXp1. Hence, 'udevadm wait' should wait for /dev/loopX.
For some reasons, the kernel sometimes does not emit uevent for
partitions, and 'udevadm wait' for partitions may fail.
Fixes #24360 .
2022-08-20 09:01:14 +09:00
Yu Watanabe
0b755a9809
Merge pull request #24353 from alpernebbi/hwdb-cros-ec-accel-base
...
udev: hwdb: Add orientation quirk for base-mounted accelerometers on Chromebooks
Reviewed-by: Alexandru Stan <amstan@chromium.org >
Reviewed-by: Gwendal Grignou <gwendal@chromium.org >
2022-08-19 14:39:47 +09:00
Yu Watanabe
ade100f3b6
Merge pull request #24348 from yuwata/network-ipv4acd-renew
...
network: fix IPv4ACD issues on DHCP renewal or reconfiguring interface
2022-08-19 14:27:05 +09:00
Yu Watanabe
3af934bceb
test-network: add tests for IPv4ACD and renewing DHCP address
2022-08-18 15:44:53 +09:00
Yu Watanabe
fd022b1da5
test-network: drop unused .network file
2022-08-18 15:44:53 +09:00
Yu Watanabe
03ff3c5a46
network: unref existing sd_ipv4acd object when not necessary
...
On reconfiguring an interface, the new setting may not enable IPv4ACD
for an existing address anymore. Hence, we need to unref it. Otherwise,
newly requested addresses may never be ready for (re-)configuring.
2022-08-18 15:44:39 +09:00
Yu Watanabe
3c45d0d099
network: update setting for IPv4ACD or IPv6DAD in existing Address objects
...
Otherwise, if the setting is changed on reconfigure, the new setting
is not applied to the existing addresses.
2022-08-18 15:44:30 +09:00
Yu Watanabe
e402e99eaa
network: fix DHCPv4 address renewal with IPv4ACD
...
Previously, when a DHCP address is renewed and if the IPv4ACD for the
address is enabled, the address will never drop the probing flag, thus
the lifetime of the address will never be updated.
This drops NETWORK_CONFIG_STATE_PROBING, and the IPv4ACD status is
managed another bit, Address.acd_bound. And, the flag is updated only
when the IPv4ACD announced the address or detects conflict.
2022-08-18 15:44:23 +09:00
Yu Watanabe
190169e591
Merge pull request #24250 from yuwata/backlight-multiple-graphics-cards
...
backlight: support multiple graphics cards system
2022-08-17 21:58:59 +09:00
Yu Watanabe
f9b3b99017
udev: rename various validate() -> should_reload() for builtin commands
...
Previously, true by validate() means several configs are outdated and we
need to reload configs. That's not intuitive for me. Let's rename the
functions.
2022-08-17 21:56:46 +09:00
Yu Watanabe
0161378cf7
Merge pull request #24333 from yuwata/sysctl
...
sysctl: improve performance for applying glob pattern
2022-08-17 21:56:15 +09:00
Yu Watanabe
59edcf2b64
test-network: add/update module check
...
For https://github.com/systemd/systemd-centos-ci/pull/517 .
2022-08-17 10:05:20 +00:00
Yu Watanabe
fa9bd36937
test: add tests for glob sysctl pattern
2022-08-17 14:30:20 +09:00
Yu Watanabe
86fc149c69
test: use assertions in sysctl tests
2022-08-17 14:30:20 +09:00
Yu Watanabe
3f75892dd2
test: do not use sysctl.d to store test conf
...
Otherwise, late invocations of systemd-sysctl, especially through udev
rules may fail.
2022-08-17 14:30:20 +09:00
Yu Watanabe
9ec8c82b8c
sysctl: apply prefix before calling glob()
...
Otherwise, if there exist million of network interfaces,
calling glob() for network properties takes much time.
Fixes #24031 .
2022-08-17 14:30:20 +09:00
Yu Watanabe
3b703fe269
path-util: introduce path_glob_can_match()
2022-08-17 14:30:20 +09:00
Yu Watanabe
7177ac4572
sysctl: split out code for applying glob option
2022-08-17 14:30:20 +09:00
Yu Watanabe
c01404fdf1
sysctl: drop /proc/sys/ in prefix
2022-08-17 14:30:20 +09:00
Yu Watanabe
350ffa9749
sysctl: use ordered_hashmap_ensure_put()
2022-08-17 14:30:20 +09:00
Yu Watanabe
e0504dd011
backlight: fix issue on multiple graphics cards system
...
If a system has multiple graphics cards, then we cannot associate
platform backlight devices to backlight devices under PCI bus.
Previously, in such case, vaidate_device() for a raw backlight device
might erroneously detect a platform device and return false. So, users
could not save/load backlight level.
This makes validate_device() give up to associate platform devices on
non-PCI bus with raw backlight devices. That may cause unwanted
backlight level save or restore by systemd-backlight@.service, but users
can workaround that by masking specific instances of the service.
Closes #24223 .
2022-08-17 14:22:43 +09:00
Yu Watanabe
f8ff4b6076
backlight: filter out unnecessary backlight devices by device enumerator
2022-08-17 14:21:36 +09:00
Yu Watanabe
b2f77b5e21
backlight: add/update several logs for validating backlight devices
2022-08-17 14:21:26 +09:00
Yu Watanabe
21d0ed68ee
test-network: add tests for MTUBytes= for bridge master and ports
...
Prompted by #24311 .
2022-08-16 21:46:40 +00:00
Yu Watanabe
ae014ecb3d
test-network: add tests for KeepCarrier= for tuntap interfaces
2022-08-16 21:57:35 +09:00
Yu Watanabe
af7a86b8a6
network/tuntap: save tun or tap file descriptor in fd store
2022-08-16 21:57:35 +09:00
Yu Watanabe
f8b7c17764
network/tuntap: introduce KeepCarrier= setting
...
Closes #24267 .
2022-08-16 21:57:31 +09:00
Yu Watanabe
8f388c4e46
network/tuntap: code cleanups
...
- merge unnecessarily split functions,
- drop unnecessary initializations,
- tighten variable scopes,
- introduce TUNTAP() helper function.
2022-08-16 21:49:04 +09:00
Yu Watanabe
2720b6f23c
login: use helper functions for fd store
2022-08-16 21:49:04 +09:00
Yu Watanabe
50e23ac667
daemon-util: introduce several helper functions for fd store
2022-08-16 21:49:00 +09:00
Yu Watanabe
be6c89b8f1
Merge pull request #24294 from rphibel/add-support-for-list-of-definitions-directories
...
repart: add support for list of definitions directories
2022-08-16 08:58:25 +09:00
Yu Watanabe
4f4e9104f3
Merge pull request #24299 from yuwata/dhcp6-no-binding
...
dhcp6: gracefully handle NoBinding error
2022-08-16 08:47:17 +09:00
Yu Watanabe
628998ecfa
udev/cdrom_id: check last track info
...
Fixes off-by-one issue.
Fixes #24306 .
2022-08-15 12:56:26 +02:00
Yu Watanabe
3f504b892b
network/bridge: fix UseBPDU= and AllowPortToBeRoot=
...
Fixes bugs caused by 7f9915f0de .
Fixes #24268 .
2022-08-14 06:56:05 +09:00
Yu Watanabe
e3e7185a70
Merge pull request #24305 from yuwata/test-network
...
test-network: also set StartLimitIntervalSec=0 for systemd-networkd.socket
2022-08-14 06:55:29 +09:00
Yu Watanabe
85b1a14d70
test-network: use "systemctl restart" to restart networkd
2022-08-14 03:56:01 +09:00
Yu Watanabe
93f5ae6ba2
test-network: also set StartLimitIntervalSec=0 for systemd-networkd.socket
...
The socket unit is frequently restarted during the test.
2022-08-14 03:49:00 +09:00
Yu Watanabe
4c275f362f
dhcp6: do not append ORO option when no option requested
...
Fixes #24292 .
2022-08-14 02:44:52 +09:00
Yu Watanabe
1929c1fcb2
dhcp6: gracefully handle NoBinding error
...
When we receive NoBinding status code, the requesting binding (address or
any other information) does not exist anymore in the server. Hence,
resending the request is meaningless. Let's restart the transaction from
the beginning in that case.
2022-08-13 05:26:22 +09:00
Yu Watanabe
38db7a4ed3
Merge pull request #24138 from Keksgesicht/rfe/cryptenroll-keyfile
...
adding the option to use a keyfile to unlock the device
2022-08-13 03:35:03 +09:00
Yu Watanabe
9d9bc6fc57
Merge pull request #24285 from yuwata/sd-device-new-from-path
...
sd-device: make sd_device_new_from_path() support symlink outside of /sys
2022-08-13 03:27:26 +09:00
Yu Watanabe
9138278b95
Merge pull request #24289 from yuwata/sd-device-monitor-set-description
...
sd-device-monitor: introduce sd_device_monitor_{set,get}_description()
2022-08-13 03:27:05 +09:00
Yu Watanabe
829bb61fb8
udev: use sd_device_new_from_path() and _new_child()
...
Follow-up for 65c2ad985a .
2022-08-12 21:48:13 +09:00
Yu Watanabe
284ef480d0
test: add more tests for sd_device_new_from_path()
2022-08-12 21:42:00 +09:00
Yu Watanabe
95c250be0d
sd-device: allow to create sd-device object through a symlink outside of /sys
...
For example, /proc/device-tree is a symlink to /sys/firmware/devicetree/base,
and the kernel documentation says the symlink should be used by userspace app.
See, https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-firmware-ofw .
Hence, it is useful to make `sd_device_new_from_path()` support such symlink.
2022-08-12 21:41:12 +09:00
Yu Watanabe
f714ecd450
udev: set description for device monitor
2022-08-12 21:27:14 +09:00
Yu Watanabe
cbdf6a1fcf
test: use sd_device_monitor_set_description()
2022-08-12 21:27:14 +09:00
Yu Watanabe
f36b683f6c
sd-device-monitor: logs description for device monitor
2022-08-12 21:27:14 +09:00
Yu Watanabe
39f11aa422
sd-device-monitor: introduce sd_device_monitor_{set,get}_description()
2022-08-12 21:27:14 +09:00
Yu Watanabe
edf6cbc30f
Merge pull request #24286 from yuwata/test-sd-device-monitor
...
test-sd-device-monitor: several fixlets
2022-08-12 21:24:40 +09:00
Yu Watanabe
0186571c9f
sd-device-enumerator: drop noisy log messages
...
These are not for failed tasks, and provide almost no information.
2022-08-12 21:23:58 +09:00
Yu Watanabe
df85ff9cad
Merge pull request #24288 from yuwata/sd-device-monitor-fixlets
...
sd-device-monitor: two fixlets
2022-08-12 21:23:24 +09:00
Yu Watanabe
8bb4989906
sd-device-monitor: actually refuse to send invalid devices
...
Fixes an issue introduced by 9e79123884 .
2022-08-12 04:34:19 +09:00
Yu Watanabe
133d78966f
sd-device-monitor: fix inversed condition
...
Fixes an issue introduced by b3d06b9226 .
2022-08-12 04:34:19 +09:00
Yu Watanabe
8164957461
test: do not fill up receiver buffer
...
If a system has many devices, then the receiver buffer may be filled up.
Hopefully fixes https://bugzilla.redhat.com/show_bug.cgi?id=2095750
2022-08-12 03:13:22 +09:00
Yu Watanabe
46c1223b24
test: add fake action and seqnum
...
Otherwise, the receiver refuses the devices. See device_verify().
2022-08-12 03:13:22 +09:00
Yu Watanabe
d7aaf35ce2
Merge pull request #24256 from systemd/wip/hadess/greaseweazle
...
hwdb: Add Greaseweazle "drives" to the list of analyzers
2022-08-10 22:27:49 +09:00
Yu Watanabe
b6f6df4cb0
oom: drop invalid %m in the log message
...
Fixes https://github.com/systemd/systemd/issues/23785#issuecomment-1210030100 .
2022-08-10 22:15:52 +09:00
Yu Watanabe
5c19169fe9
tree-wide: fix typo
2022-08-10 19:43:38 +09:00
Yu Watanabe
53403091d6
meson: use 'not in'
...
Follow-ups for 60f97fee2d and
3296334473 .
2022-08-09 20:21:30 +01:00
Yu Watanabe
23b3819209
test-network: split out qdisc and wait-online tests from NetworkdNetworkTests
2022-08-09 19:37:50 +09:00
Yu Watanabe
4c7d13f4b2
test-network: split test_qdisc() and test_qdisc2()
...
And check module availability in each tests.
This also sorts qdisc tests.
2022-08-09 19:37:50 +09:00
Yu Watanabe
854f989958
test-network: check qdisc feature by module existence
2022-08-09 19:37:50 +09:00
Yu Watanabe
5cdc7c89cb
test-network: rename tun99 and tap99
...
The names seem to be used in AWS.
This also merges test_tun() and test_tap().
2022-08-09 19:37:49 +09:00
Yu Watanabe
17479d51cc
test-network: show stdout and stderr on failure in check_output()
2022-08-09 19:37:49 +09:00
Yu Watanabe
66504b22e2
test-network: drop unused text= arguments
2022-08-09 19:37:49 +09:00
Yu Watanabe
b05c4d6bbf
test-network: also run timesyncd under sanitizer or valgrind
2022-08-09 19:37:49 +09:00
Yu Watanabe
67a9b3ec94
test-network: use timedatectl in build directory
2022-08-09 19:37:49 +09:00
Yu Watanabe
9b2a2e06c4
network/teql: wait for corresponding teql interface to be available
2022-08-09 19:37:49 +09:00
Yu Watanabe
21261ea231
network/qdisc: introduce is_ready() in qdisc vtable
...
Preparation for next commit.
2022-08-09 19:37:49 +09:00
Yu Watanabe
85ff4150e1
backlight: accept embedded display port named e.g. card0-eDP-1
2022-08-09 14:30:05 +09:00
Yu Watanabe
eff6bc9294
Merge pull request #24244 from yuwata/device-enumerator
...
sd-device-enumerator: fix sysattr match
2022-08-09 04:57:48 +09:00
Yu Watanabe
50f9c507b2
test: add tests for sd_device_enumerator_add_match_sysattr/property()
2022-08-09 02:21:25 +09:00
Yu Watanabe
b07131facf
sd-device-enumerator: FOREACH_DEVICE_PROPERTY() does not provide NULL value
...
Hence, when sd_device_enumerator_add_match_property() called with NULL
for value, then the filter always unmatches with the device.
2022-08-09 01:17:03 +09:00
Yu Watanabe
585f2035b3
sd-device-enumerator,monitor: fix sysattr match
...
Previously, if sd_device_enumerator_add_match_sysattr() is called for
the same sysattr with different values, then no device passed the filter.
Now, the accepted values (or patterns) are stored in strv, and if the
sysattr value of a device matches with the strv, then the device passes
the filter.
2022-08-09 01:17:00 +09:00
Yu Watanabe
57a0e3f503
Merge pull request #24221 from yuwata/dhcp-client-cleanups
...
dhcp: use struct hw_addr_data
2022-08-08 23:59:58 +09:00
Yu Watanabe
52be2b43f5
hash-funcs: introduce string_hash_ops_free_strv_free
2022-08-08 23:41:28 +09:00
Yu Watanabe
113522868a
dhcp: add assertions about client state
2022-08-08 20:19:46 +09:00
Yu Watanabe
4473cd7f61
dhcp: fix potential buffer overflow
...
Fixes a bug introduced by 324f818781 .
This also renames several macros for DHCP packet size.
2022-08-06 13:06:32 +09:00
Yu Watanabe
073a1daaba
dhcp: make dhcp_network_bind_raw_socket() take struct hw_addr_data
2022-08-06 04:57:27 +09:00
Yu Watanabe
8cad358e4a
dhcp: make dhcp_identifier_set_duid() take struct hw_addr_data
2022-08-06 04:53:36 +09:00
Yu Watanabe
3b75435db6
dhcp: make dhcp_identifier_set_iaid() take struct hw_addr_data
2022-08-06 04:53:36 +09:00
Yu Watanabe
e0ead13088
sd-dhcp6-client: use hw_addr_set()
2022-08-06 04:53:36 +09:00
Yu Watanabe
7e5c25b244
sd-dhcp-client: use struct hw_addr_data to store MAC and broadcast address
2022-08-06 04:53:36 +09:00
Yu Watanabe
069f5df051
ether-addr-util: introduce hw_addr_set() helper function
2022-08-06 04:53:36 +09:00
Yu Watanabe
7fddb9704f
dhcp4: stop client before updating MAC address
2022-08-06 04:53:36 +09:00
Yu Watanabe
ebf404a4d0
sd-netlink: rename NLType and friends
...
In sd-netlink, we use 'type' for naming many variables with different type,
and worst of all, function like `type_get_type()` exists. That makes the
code hard to understood.
Let's rename
- NLType -> NLAPolicy
- NLTypeSystem -> NLAPolicySet
- NLTypeSystemUnion -> NLAPolicySetUnion
- type_get_type() -> policy_get_type()
- type_get_type_system() -> policy_get_policy_set(), and so on.
This also changes the type of attribute taken by e.g.
`sd_netlink_message_append_string()` from `unsigned short` -> `uint16_t`
to make the variable size clearer.
2022-08-06 03:53:51 +09:00