Merge pull request #33695 from DaanDeMeyer/epel
mkosi: Add CI for CentOS Stream 10
This commit is contained in:
@@ -5,6 +5,9 @@ integration_tests += [
|
||||
'name' : fs.name(meson.current_source_dir()),
|
||||
'credentials' : integration_test_template['credentials'] + [
|
||||
files('systemd.unit-dropin.init.scope'),
|
||||
# OpenSUSE disables all controller delegation for the user manager template. Mask the
|
||||
# dropin to make TEST-55-OOMD pass on OpenSUSE.
|
||||
'systemd.unit-dropin.user@.service~20-defaults-SUSE=',
|
||||
],
|
||||
'vm' : true,
|
||||
},
|
||||
|
||||
@@ -25,7 +25,7 @@ def add_drive(i: int, serial: str) -> None:
|
||||
"Options": "cache=unsafe",
|
||||
}
|
||||
]
|
||||
config["QemuArgs"] += ["-device", f"nvme,drive={id},serial={serial},num_queues=8"]
|
||||
config["QemuArgs"] += ["-device", f"nvme,drive={id},serial={serial},max_ioqpairs=8"]
|
||||
|
||||
for i in range(5):
|
||||
add_drive(i, serial=f"deadbeef{i}")
|
||||
|
||||
@@ -7120,6 +7120,7 @@ class NetworkdDHCPPDTests(unittest.TestCase, Utilities):
|
||||
self.assertGreater(prefixInfo[0]['PreferredLifetimeUSec'], 0)
|
||||
self.assertGreater(prefixInfo[0]['ValidLifetimeUSec'], 0)
|
||||
|
||||
@unittest.skipUnless(shutil.which('dhcpd'), reason="dhcpd is not available on CentOS Stream 10")
|
||||
def test_dhcp6pd_no_address(self):
|
||||
# For issue #29979.
|
||||
copy_network_unit('25-veth.netdev', '25-dhcp6pd-server.network', '25-dhcp6pd-upstream-no-address.network')
|
||||
@@ -7136,6 +7137,7 @@ class NetworkdDHCPPDTests(unittest.TestCase, Utilities):
|
||||
|
||||
self.check_dhcp6_prefix('veth99')
|
||||
|
||||
@unittest.skipUnless(shutil.which('dhcpd'), reason="dhcpd is not available on CentOS Stream 10")
|
||||
def test_dhcp6pd_no_assign(self):
|
||||
# Similar to test_dhcp6pd_no_assign(), but in this case UseAddress=yes (default),
|
||||
# However, the server does not provide IA_NA. For issue #31349.
|
||||
@@ -7153,6 +7155,7 @@ class NetworkdDHCPPDTests(unittest.TestCase, Utilities):
|
||||
|
||||
self.check_dhcp6_prefix('veth99')
|
||||
|
||||
@unittest.skipUnless(shutil.which('dhcpd'), reason="dhcpd is not available on CentOS Stream 10")
|
||||
def test_dhcp6pd(self):
|
||||
copy_network_unit('25-veth.netdev', '25-dhcp6pd-server.network', '25-dhcp6pd-upstream.network',
|
||||
'25-veth-downstream-veth97.netdev', '25-dhcp-pd-downstream-veth97.network', '25-dhcp-pd-downstream-veth97-peer.network',
|
||||
|
||||
@@ -179,6 +179,10 @@ elif [[ $1 == initgroups ]]; then
|
||||
fi
|
||||
EOF
|
||||
chmod +x "$root/bin/getent"
|
||||
# The useradd is important here so the user is added to /etc/passwd. If the user is not in /etc/passwd,
|
||||
# bash will end up loading libnss_systemd.so which breaks when libnss_systemd.so is built with sanitizers
|
||||
# as bash isn't invoked with the necessary environment variables for that.
|
||||
useradd --root="$root" --uid 1000 --user-group --create-home testuser
|
||||
systemd-nspawn --directory="$root" bash -xec '[[ $USER == root ]]'
|
||||
systemd-nspawn --directory="$root" --user=testuser bash -xec '[[ $USER == testuser ]]'
|
||||
|
||||
@@ -672,8 +676,10 @@ fi
|
||||
EOF
|
||||
chmod +x "$root/bin/getent"
|
||||
|
||||
mkdir -p "$root/home/testuser"
|
||||
chown 1010:1010 "$root/home/testuser"
|
||||
# The useradd is important here so the user is added to /etc/passwd. If the user is not in /etc/passwd,
|
||||
# bash will end up loading libnss_systemd.so which breaks when libnss_systemd.so is built with sanitizers
|
||||
# as bash isn't invoked with the necessary environment variables for that.
|
||||
useradd --root="$root" --uid 1010 --user-group --create-home testuser
|
||||
|
||||
cmd='PERMISSIONS=$(stat -c "%u:%g" /home/testuser/file); if [[ $PERMISSIONS != "1010:1010" ]]; then echo "*** wrong permissions: $PERMISSIONS"; return 1; fi; touch /home/testuser/other_file'
|
||||
if ! SYSTEMD_LOG_TARGET=console \
|
||||
|
||||
@@ -355,15 +355,16 @@ portablectl "${ARGS[@]}" attach --copy=symlink --now --runtime /tmp/rootdir mini
|
||||
portablectl detach --now --runtime --enable /tmp/rootdir minimal-app0
|
||||
|
||||
# The wrong file should be ignored, given the right one has the xattr set
|
||||
mkdir -p /tmp/wrongext/usr/lib/extension-release.d /tmp/wrongext/usr/lib/systemd/system/
|
||||
echo "[Service]" > /tmp/wrongext/usr/lib/systemd/system/app0.service
|
||||
touch /tmp/wrongext/usr/lib/extension-release.d/extension-release.wrongext_somethingwrong.txt
|
||||
cp /tmp/rootdir/usr/lib/os-release /tmp/wrongext/usr/lib/extension-release.d/extension-release.app0
|
||||
setfattr -n user.extension-release.strict -v "false" /tmp/wrongext/usr/lib/extension-release.d/extension-release.app0
|
||||
portablectl "${ARGS[@]}" attach --runtime --extension /tmp/wrongext /tmp/rootdir app0
|
||||
trap 'rm -rf /var/cache/wrongext' EXIT
|
||||
mkdir -p /var/cache/wrongext/usr/lib/extension-release.d /var/cache/wrongext/usr/lib/systemd/system/
|
||||
echo "[Service]" > /var/cache/wrongext/usr/lib/systemd/system/app0.service
|
||||
touch /var/cache/wrongext/usr/lib/extension-release.d/extension-release.wrongext_somethingwrong.txt
|
||||
cp /tmp/rootdir/usr/lib/os-release /var/cache/wrongext/usr/lib/extension-release.d/extension-release.app0
|
||||
setfattr -n user.extension-release.strict -v "false" /var/cache/wrongext/usr/lib/extension-release.d/extension-release.app0
|
||||
portablectl "${ARGS[@]}" attach --runtime --extension /var/cache/wrongext /tmp/rootdir app0
|
||||
status="$(portablectl is-attached --extension wrongext rootdir)"
|
||||
[[ "${status}" == "attached-runtime" ]]
|
||||
portablectl detach --runtime --extension /tmp/wrongext /tmp/rootdir app0
|
||||
portablectl detach --runtime --extension /var/cache/wrongext /tmp/rootdir app0
|
||||
|
||||
umount /tmp/rootdir
|
||||
umount /tmp/app0
|
||||
|
||||
Reference in New Issue
Block a user