summaryrefslogtreecommitdiff
path: root/test/TEST-43-PRIVATEUSER-UNPRIV
Commit message (Collapse)AuthorAgeFilesLines
* test: "detect" the test number automagicallyFrantisek Sumsal2021-04-261-1/+1
| | | | | | Specifying the test number manually is tedious and prone to errors (as recently proven). Since we have all the necessary data to work out the test number, let's do it automagically.
* test: make the test entrypoint scripts shellcheck-compliantFrantisek Sumsal2021-04-201-1/+4
|
* test: de-duplicate test_setup() functionsZbigniew Jędrzejewski-Szmek2020-03-281-13/+0
| | | | Now we will run setup_nspawn_root() in some case where do don't need to.
* test: move TEST-43-* setup to static filesZbigniew Jędrzejewski-Szmek2020-03-282-97/+1
| | | | | Setup of lingering is dropped. I don't think it's necessary for anything, because the unit is still pulled in from the testsuite service.
* treewide: more portable bash shebangsJörg Thalheim2020-03-052-2/+2
| | | | | | | | | | | | | | | | As in 2a5fcfae024ffc370bb780572279f45a1da3f946 and in 3e67e5c9928f8b1e1c5a63def88d53ed1fed12eb using /usr/bin/env allows bash to be looked up in PATH rather than being hard-coded. As with the previous changes the same arguments apply - distributions have scripts to rewrite shebangs on installation and they know what locations to rely on. - For tests/compilation we should rather rely on the user to have setup there PATH correctly. In particular this makes testing from git easier on NixOS where do not provide /bin/bash to improve compose-ability.
* testsuite: drop "systemctl is-system-running --wait" invocationLennart Poettering2020-01-061-2/+0
| | | | | | | | | We wait for "basic.target" being reached in the user instance anyway before allowing the user's session to start, hence doing such a wait is unnecessary, since that would just mean we'd wait for "default.target" on top of "basic.target", but we shouldn#t need anything of that... Hence, let's simplify this, reduce explicit sync points.
* test: don't rely on "nobody" user for TEST-43Lennart Poettering2020-01-062-22/+25
| | | | | | The name is not as universal as we want, still, hence let's use our own user we create with sysusers.d/. That should yield same behaviour everywhere (and also test sysusers a bit as side effect).
* test: hardcode shell to useLennart Poettering2020-01-061-1/+1
| | | | | | let's make sure we always invoke our commands through /bin/sh, since on some distros su will use /bin/nologin (or whatever is listed in /etc/passwd) as shell otherwise and we don#t want that.
* test: use symlinks for MakefilesLennart Poettering2020-01-031-9/+1
| | | | | for some reason the newer tests used file copyies instead of symlinks. let's fix that.
* core: create inaccessible nodes for users when making runtime dirsAnita Zhang2019-12-182-0/+10
| | | | | | To support ProtectHome=y in a user namespace (which mounts the inaccessible nodes), the nodes need to be accessible by the user. Create these paths and devices in the user runtime directory so they can be used later if needed.
* core: add test case for PrivateUsers=true in user managerFilipe Brandenburger2019-12-183-0/+115
The test exercises that PrivateTmp=yes and ProtectHome={read-only,tmpfs} directives work as expected when PrivateUsers=yes in a user manager. Some code is also added to test-functions to help set up test cases that exercise the user manager.