1
0
mirror of https://github.com/systemd/systemd synced 2025-10-05 19:54:46 +02:00

Compare commits

...

4 Commits

Author SHA1 Message Date
Yu Watanabe
0c699debde varlink-idl: fix type of ProcessId.bootId
Fixes a bug in 0fc530d15709a4b531412fdadf3cfb5d0433b62f (v257).
Fixes #38276.
2025-07-22 01:11:12 +01:00
Yu Watanabe
94ad755008 ci/build-test: install libarchive-dev
Previously, the package was not installed, hence the feature was always
disabled in the build test.
2025-07-22 01:09:47 +01:00
Yu Watanabe
2cfa513356 test: missing -v option for command
Otherwise the specified command is invoked, not only checking the
existence of the command.
2025-07-22 01:08:43 +01:00
Yu Watanabe
911a52b769 test-sd-device: also exclude dm block devices
To avoid the following error:
```
test_sd_device_one(/sys/devices/virtual/block/dm-9)
src/libsystemd/sd-device/test-sd-device.c:104: Assertion failed: Expected "sd_device_new_from_syspath(&dev, syspath)" to succeed, but got error: -19/ENODEV
```

This also updates outdates comment about CentOS CI.
2025-07-22 01:04:42 +01:00
5 changed files with 11 additions and 6 deletions

View File

@ -27,6 +27,7 @@ PACKAGES=(
isc-dhcp-client
itstool
kbd
libarchive-dev
libblkid-dev
libbpf-dev
libcap-dev

View File

@ -303,8 +303,12 @@ static void exclude_problematic_devices(sd_device_enumerator *e) {
* disappear during running this test. Let's exclude them here for stability. */
ASSERT_OK(sd_device_enumerator_add_match_subsystem(e, "bdi", false));
ASSERT_OK(sd_device_enumerator_add_nomatch_sysname(e, "loop*"));
/* On CentOS CI, systemd-networkd-tests.py may be running when this test is invoked. The networkd
* test creates and removes many network interfaces, and may interfere with this test. */
/* On some CI environments, it seems dm block devices sometimes disappear during running this test.
* Let's exclude them here for stability. */
ASSERT_OK(sd_device_enumerator_add_nomatch_sysname(e, "dm-*"));
/* Several other unit tests create and remove virtual network interfaces, e.g. test-netlink and
* test-local-addresses. When one of these tests run in parallel with this unit test, the enumerated
* device may disappear. Let's exclude them here for stability. */
ASSERT_OK(sd_device_enumerator_add_match_subsystem(e, "net", false));
}

View File

@ -18,7 +18,7 @@ SD_VARLINK_DEFINE_STRUCT_TYPE(
SD_VARLINK_FIELD_COMMENT("64bit inode number of pidfd if known"),
SD_VARLINK_DEFINE_FIELD(pidfdId, SD_VARLINK_INT, SD_VARLINK_NULLABLE),
SD_VARLINK_FIELD_COMMENT("Boot ID of the system the inode number belongs to"),
SD_VARLINK_DEFINE_FIELD(bootId, SD_VARLINK_INT, SD_VARLINK_NULLABLE));
SD_VARLINK_DEFINE_FIELD(bootId, SD_VARLINK_STRING, SD_VARLINK_NULLABLE));
SD_VARLINK_DEFINE_STRUCT_TYPE(
RateLimit,

View File

@ -293,7 +293,7 @@ test_syntax_error 'OWNER!="b"' 'Invalid operator for OWNER.'
test_syntax_error 'OWNER+="0"' "OWNER key takes '=' or ':=' operator, assuming '='."
# numeric system UID is valid even if it does not exist
SYS_UID_MAX=999
if command userdbctl >/dev/null; then
if command -v userdbctl >/dev/null; then
# For the case if non-default setting is used. E.g. OpenSUSE uses 499.
SYS_UID_MAX="$(userdbctl user -S --no-legend --no-pager | grep 'end system' | awk '{print $8}')"
echo "SYS_UID_MAX=$SYS_UID_MAX acquired from userdbctl"
@ -325,7 +325,7 @@ test_syntax_error 'GROUP!="b"' 'Invalid operator for GROUP.'
test_syntax_error 'GROUP+="0"' "GROUP key takes '=' or ':=' operator, assuming '='."
# numeric system GID is valid even if it does not exist
SYS_GID_MAX=999
if command userdbctl >/dev/null; then
if command -v userdbctl >/dev/null; then
# For the case if non-default setting is used. E.g. OpenSUSE uses 499.
SYS_GID_MAX="$(userdbctl group -S --no-legend --no-pager | grep 'end system' | awk '{print $8}')"
echo "SYS_GID_MAX=$SYS_GID_MAX acquired from userdbctl"

View File

@ -16,7 +16,7 @@ set -o pipefail
# shellcheck source=test/units/util.sh
. "$(dirname "$0")"/util.sh
if ! command knotc >/dev/null; then
if ! command -v knotc >/dev/null; then
echo "command knotc not found, skipping..." | tee --append /skipped
exit 77
fi