diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-16 18:20:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-16 18:20:44 +0000 |
commit | 17fde7b1b1bba39f569a221e9f35957823d1fe84 (patch) | |
tree | 178f94e405930e4b685de71d1c281b7b82f4fc79 /debian/tests | |
parent | Merging upstream version 256.4. (diff) | |
download | systemd-17fde7b1b1bba39f569a221e9f35957823d1fe84.tar.xz systemd-17fde7b1b1bba39f569a221e9f35957823d1fe84.zip |
Merging debian version 256.4-1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests')
-rwxr-xr-x | debian/tests/boot-and-services | 12 | ||||
-rw-r--r-- | debian/tests/control | 4 | ||||
-rwxr-xr-x | debian/tests/upstream | 21 |
3 files changed, 34 insertions, 3 deletions
diff --git a/debian/tests/boot-and-services b/debian/tests/boot-and-services index e4ed862..45c02c9 100755 --- a/debian/tests/boot-and-services +++ b/debian/tests/boot-and-services @@ -129,6 +129,14 @@ class ServicesTest(unittest.TestCase): @unittest.skipIf('pkg.systemd.upstream' in os.environ.get('DEB_BUILD_PROFILES', ''), 'Debian specific configuration, N/A for upstream') def test_tmp_cleanup(self): + # autopkgtest overrides tmp.mount with empty /etc/systemd/system/tmp.mount + # as a workaround for issues where /tmp is filled up too easily. LP: #2069834 + try: + if os.stat('/etc/systemd/system/tmp.mount').st_size == 0: + self.skipTest('autopkgtest environment has overridden tmp.mount') + except FileNotFoundError: + pass + # systemd-tmpfiles-clean.timer only runs 15 mins after boot, shortcut # it self.assertEqual(subprocess.call( @@ -218,8 +226,8 @@ poweroff\n''') out = nspawn.communicate(timeout=60)[0] self.assertIn(b'Spawning container c1', out) self.assertIn(b'fake container started', out) - self.assertRegex(out, b'\n\s+1\s+0\s+init[\r\n]') - self.assertRegex(out, b'\n\s+2+\s+0\s.*rcS[\r\n]') + self.assertRegex(out, rb'\n\s+1\s+0\s+init[\r\n]') + self.assertRegex(out, rb'\n\s+2+\s+0\s.*rcS[\r\n]') self.assertRegex(out, b'Container c1.*shut down') self.assertEqual(nspawn.returncode, 0) diff --git a/debian/tests/control b/debian/tests/control index 6c8f773..141c0dc 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -7,7 +7,7 @@ Depends: systemd, acl, locales, evemu-tools, -Restrictions: needs-root, isolation-container, skippable, breaks-testbed +Restrictions: needs-root, allow-stderr, isolation-container, skippable, breaks-testbed Tests: unit-config Depends: systemd, @@ -152,6 +152,8 @@ Depends: systemd (>= 254~), libnss-mymachines, libnss-resolve, libnss-systemd, + libsystemd-dev, + libudev-dev, qemu-system-x86 [amd64 i386], qemu-system-arm [arm64 armhf], qemu-system-ppc [ppc64el], diff --git a/debian/tests/upstream b/debian/tests/upstream index 3736f39..7d81f29 100755 --- a/debian/tests/upstream +++ b/debian/tests/upstream @@ -3,6 +3,26 @@ set -e set -x +RELEASE=$( + . /etc/os-release; + if [ "$ID" = "ubuntu" ]; then + echo "$VERSION_CODENAME" + elif [ "$ID" = "debian" ]; then + if [ -n "$VERSION_ID" ] && [ -n "$VERSION_CODENAME" ]; then + echo "$VERSION_CODENAME" + else + debian_version="$(cat /etc/debian_version)" + if [ "${debian_version#*/}" = sid ]; then + if [ "$VERSION_CODENAME" = sid ] || grep -q -r sid /etc/apt/sources.list* || grep -q -r unstable /etc/apt/sources.list*; then + echo "unstable" + else + echo "$VERSION_CODENAME" + fi + fi + fi + fi +) + cleanup () { if [ -f "${workdir}/btrfs/build/meson-logs/testlog.txt" ]; then cp "${workdir}/btrfs/build/meson-logs/testlog.txt" "$AUTOPKGTEST_ARTIFACTS" @@ -61,6 +81,7 @@ PackageCacheDirectory=$workdir/cache [Distribution] PackageManagerTrees=/etc/apt/preferences.d/:/etc/apt/preferences.d/ +${RELEASE:+"Release=${RELEASE}"} [Content] Environment=NO_BUILD=1 NO_SYNC=1 ARTIFACT_DIRECTORY="$AUTOPKGTEST_ARTIFACTS" TEST_SAVE_JOURNAL=fail TEST_SHOW_JOURNAL=warning |