summaryrefslogtreecommitdiffstats
path: root/test/TEST-43-PRIVATEUSER-UNPRIV/test.sh (follow)
Commit message (Collapse)AuthorAgeFilesLines
* mkosi: Build minimal images and enable related integration testsDaan De Meyer2024-04-251-0/+1
| | | | | | | | | | | | | | This commit adds definitions to build the minimal_0 and minimal_1 images with mkosi and includes them into the system image. We also move the building of the various app-xxx and similar images that are extremely minimal into the tests itself by moving the related logic from install_verity_minimal() into a new function install_extension_images() in util.sh. Because the mkosi /usr is read-only, we now place the extension images in /tmp instead of /usr/share. Co-authored-by: Richard Maw <richard.maw@codethink.co.uk> Co-authored-by: sam-leonard-ct <sam.leonard@codethink.co.uk>
* test: introduce test_require_bin() and use itFrantisek Sumsal2023-06-051-1/+1
| | | | No functional change.
* test: install the overlayfs/loop modules unconditionallyFrantisek Sumsal2023-05-141-6/+2
|
* core: support ExtensionDirectories in user managerLuca Boccassi2022-03-101-0/+2
| | | | | | | Unprivileged overlayfs is supported since Linux 5.11. The only change needed to get ExtensionDirectories to work is to avoid hard-coding the staging directory to the system manager runtime directory, everything else just works (TM).
* core: support MountAPIVFS and RootDirectory in user managerLuca Boccassi2022-03-101-0/+9
| | | | | | | | | | | | | | | The only piece missing was to somehow make /proc appear in the new user+mount namespace. It is not possible to mount a new /proc instance, not even with hidepid=invisible,subset=pid, in a user namespace unless a PID namespace is created too (and also at the same time as the other namespaces, it is not possible to mount a new /proc in a child process that creates a PID namespace forked from a parent that created a user+mount namespace, it has to happen at the same time). Use the host's /proc with a bind-mount as a fallback for this case. User session services would already run with it, so nothing is lost.
* tests: add spdx headers to scripts and MakefilesZbigniew Jędrzejewski-Szmek2021-10-181-0/+1
|
* 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-281-29/+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-051-1/+1
| | | | | | | | | | | | | | | | 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.
* test: don't rely on "nobody" user for TEST-43Lennart Poettering2020-01-061-7/+10
| | | | | | 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).
* core: create inaccessible nodes for users when making runtime dirsAnita Zhang2019-12-181-0/+1
| | | | | | 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-181-0/+45
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.