diff --git a/src/test/test-aux-scope.c b/src/test/test-aux-scope.c index 175757b1c18..c6a1d292730 100644 --- a/src/test/test-aux-scope.c +++ b/src/test/test-aux-scope.c @@ -10,6 +10,7 @@ #include "bus-error.h" #include "bus-message.h" #include "bus-wait-for-jobs.h" +#include "daemon-util.h" #include "fd-util.h" #include "log.h" #include "missing_syscall.h" @@ -152,6 +153,10 @@ int main(int argc, char *argv[]) { pids[i] = TAKE_PIDREF(pidref); } + r = sd_notify(false, NOTIFY_READY); + if (r < 0) + return log_error_errno(r, "Failed to send readiness notification: %m"); + r = sd_event_loop(event); if (r < 0) return log_error_errno(r, "Failed to run event loop: %m"); diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index ec6d8dcfa16..722dff100a1 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -2512,7 +2512,7 @@ static int item_do( fdaction_t action) { struct stat st; - int r = 0, q; + int r = 0, q = 0; assert(c); assert(i); @@ -2547,9 +2547,10 @@ static int item_do( continue; de_fd = openat(fd, de->d_name, O_NOFOLLOW|O_CLOEXEC|O_PATH); - if (de_fd < 0) - q = log_error_errno(errno, "Failed to open() file '%s': %m", de->d_name); - else { + if (de_fd < 0) { + if (errno != -ENOENT) + q = log_error_errno(errno, "Failed to open file '%s': %m", de->d_name); + } else { _cleanup_free_ char *de_path = NULL; de_path = path_join(path, de->d_name); diff --git a/test/units/delegated_cgroup_filtering_payload.sh b/test/units/delegated_cgroup_filtering_payload.sh index 7ad486bcadd..1181fbb9108 100755 --- a/test/units/delegated_cgroup_filtering_payload.sh +++ b/test/units/delegated_cgroup_filtering_payload.sh @@ -6,4 +6,4 @@ mkdir /sys/fs/cgroup/system.slice/delegated-cgroup-filtering.service/the_child echo "parent_process: hello, world!" echo "parent_process: hello, people!" -sleep .15 +sleep 2 diff --git a/test/units/generator-utils.sh b/test/units/generator-utils.sh index fb62747fa1f..97a63d80431 100755 --- a/test/units/generator-utils.sh +++ b/test/units/generator-utils.sh @@ -72,7 +72,7 @@ run_and_list() { ls -lR "$out_dir" if [[ -n "${environ:-}" ]]; then - umount /proc/1/environ + umount /proc/1/environ --lazy rm -f "$environ" fi } diff --git a/test/units/testsuite-07.aux-scope.sh b/test/units/testsuite-07.aux-scope.sh index 41c0617d4db..8e2a99ce027 100755 --- a/test/units/testsuite-07.aux-scope.sh +++ b/test/units/testsuite-07.aux-scope.sh @@ -11,7 +11,7 @@ if ! grep -q pidfd_open /proc/kallsyms; then fi systemd-run --unit test-aux-scope.service \ - -p Slice=aux.slice -p Type=exec -p TasksMax=99 -p CPUWeight=199 -p IPAccounting=yes \ + --service-type notify -p Slice=aux.slice -p TasksMax=99 -p CPUWeight=199 -p IPAccounting=yes \ /usr/lib/systemd/tests/unit-tests/manual/test-aux-scope kill -s USR1 "$(systemctl show --value --property MainPID test-aux-scope.service)" diff --git a/test/units/testsuite-74.mount.sh b/test/units/testsuite-74.mount.sh index 594c123e1ba..57b06bb005b 100755 --- a/test/units/testsuite-74.mount.sh +++ b/test/units/testsuite-74.mount.sh @@ -32,8 +32,9 @@ systemd-mount --list --quiet # Set up a simple block device for further tests dd if=/dev/zero of="$WORK_DIR/simple.img" bs=1M count=16 +mkfs.ext4 -L sd-mount-test "$WORK_DIR/simple.img" LOOP="$(losetup --show --find "$WORK_DIR/simple.img")" -mkfs.ext4 -L sd-mount-test "$LOOP" +udevadm wait --timeout 60 --settle "$LOOP" mkdir "$WORK_DIR/mnt" mount "$LOOP" "$WORK_DIR/mnt" touch "$WORK_DIR/mnt/foo.bar" @@ -130,8 +131,9 @@ systemd-umount "$WORK_DIR/simple.img" # Create a vfat image, as ext4 doesn't support uid=/gid= fixating for all # files/directories dd if=/dev/zero of="$WORK_DIR/owner-vfat.img" bs=1M count=16 +mkfs.vfat -n owner-vfat "$WORK_DIR/owner-vfat.img" LOOP="$(losetup --show --find "$WORK_DIR/owner-vfat.img")" -mkfs.vfat -n owner-vfat "$LOOP" +udevadm wait --timeout 60 --settle "$LOOP" # Mount it and check the UID/GID [[ "$(stat -c "%U:%G" "$WORK_DIR/mnt")" == "root:root" ]] systemd-mount --owner=testuser "$LOOP" "$WORK_DIR/mnt" diff --git a/test/units/testsuite-81.getty-generator.sh b/test/units/testsuite-81.getty-generator.sh index 103e9661913..d1dd22c18ec 100755 --- a/test/units/testsuite-81.getty-generator.sh +++ b/test/units/testsuite-81.getty-generator.sh @@ -85,5 +85,5 @@ PID1_ENVIRON="SYSTEMD_GETTY_AUTO=0" run_and_list "$GENERATOR_BIN" "$OUT_DIR" [[ "$(find "$OUT_DIR" ! -type d | wc -l)" -eq 0 ]] # Cleanup -umount /sys/class/tty/console/active +umount /sys/class/tty/console/active --lazy rm -f "${DUMMY_CONSOLES[@]/#//dev/}" /dev/notatty99