Skip to content

selftest: the systemd.sh block fails when the selftest runs as root #4

Open

Description

@apankov

Run as root (in a container, say), the block "== systemd.sh: installing, removing and checking units" fails on every check. The scratch machine is then owned by root, and systemd.sh rightly refuses to install units for a machine owned by root (SERVICE_USER would be root). CI runs as an ordinary user, so it stays green, but anyone running the suite as root sees 14 false failures.

What to build: under root, give the scratch machine an ordinary owner (for instance chown -R nobody on $SM, if that user exists), or skip the block with a line that says why — a skip must say so, never pass silently.

Where to look: platform/bin/selftest.sh, the SM="$WORK/units-machine" block.

Done when: docker run --rm -v "$PWD":/src ubuntu:24.04 … running the selftest as root shows no failures in that block.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions