summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-mapnik/python-mapnik_std_optional.patch
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2024-04-24 19:11:06 +0200
committeraszlig <aszlig@nix.build>2024-05-13 00:40:36 +0200
commit51d3f3475c2fb35f0d9682ea600066b1cea459c6 (patch)
tree2b272ca36ddbb2d935da90d9e5fcc6fc07b3a18d /pkgs/development/python-modules/python-mapnik/python-mapnik_std_optional.patch
parentf7d026b4312a3f50c44d97be32b0669e8fad2a76 (diff)
nixos/tests/confinement: Run test probes in Python
So far the architecture for the tests was that we would use a systemd socket unit using the Accept option to start a small shell process where we can pipe commands into by connecting to the socket created by the socket unit. This is unnecessary since we can directly use the code snippets from the individual subtests and systemd will take care of checking the return code in case we get any assertions[^1]. Another advantage of this is that tests now run in parallel, so we can do rather expensive things such as looking in /nix to see whether anything is writable. The new assert_permissions() function is the main driver behind this and allows for a more fine-grained way to check whether we got the right permissions whilst also ignoring irrelevant things such as read-only empty directories. Our previous approach also just did a read-only check, which might be fine in full-apivfs mode where the attack surface already is large, but in chroot-only mode we really want to make sure nothing is every writable. A downside of the new approach is that currently the unit names are numbered via lib.imap1, which makes it annoying to track its definition. [^1]: Speaking of assertions, I wrapped the code to be run with pytest's assertion rewriting, so that we get more useful AssertionErrors. Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'pkgs/development/python-modules/python-mapnik/python-mapnik_std_optional.patch')
0 files changed, 0 insertions, 0 deletions