aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
AgeCommit message (Collapse)Author
2025-09-22test: check init lingering timeout behaviourOphestra
This checks init timeout on lingering process after initial process termination. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-15internal/sys: separate hsu uid cacheOphestra
This begins the effort of the removal of the sys package. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-14test/sandbox: create marker in /var/tmpOphestra
This prepares the test suite for private TMPDIR. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-14test/sandbox/tool: marker pathname from flagOphestra
Since this is going to be placed in a shared directory, it needs to be unique to the identity. Instead of trying to figure out identity from mountinfo, just have the test script pass hardcoded values. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-14test/sandbox: check extra writable pathsOphestra
This is not always obvious from mountinfo. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-14test/sandbox: bind /var/tmp writableOphestra
This makes it possible to place markers with private tmpdir. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-14internal/app: mount /dev/shm earlyOphestra
This avoids covering /dev/shm mounts from hst. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-06cmd/hakurei/command: pd run dbus-verbose nil checkOphestra
This otherwise dereferences a nil pointer when dbus-verbose is set and either session or system bus are nil. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-27app/seal: leave $DISPLAY as is on host abstractOphestra
This helps work around faulty software that misinterprets unix: DISPLAY string. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-26container/initdev: mount tmpfs on shm for ro devOphestra
Programs expect /dev/shm to be a writable tmpfs. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-26hst: use hsu userid for share path suffixOphestra
The privileged user is identifier to hakurei through its hsu userid. Using the kernel uid here makes little sense and is a leftover design choice from before hsu was implemented. Closes #7. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-26hst/config: remove data field, rename dir to homeOphestra
There is no reason to give the home directory special treatment, as this behaviour can be quite confusing. The home directory also does not necessarily require its own mount point, it could be provided by a parent or simply be ephemeral. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-25hst/config: remove container etc fieldOphestra
This no longer needs special treatment since it can be specified as a generic filesystem entry. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-18container: optionally isolate host abstract UNIX domain sockets via landlockClayton Gilmer
2025-08-18test/sandbox: do not discard stderr getting hashOphestra
This is the first hakurei run in the test, if the container outright fails to start this is often where it happens, so throwing away the output is very unhelpful. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-18app: set up acl on X11 socketOphestra
The socket is typically owned by the priv-user, and inaccessible by the target user, so just allowing access to the directory is not enough. This change fixes this oversight and add checks that will also be useful for merging https://git.gensokyo.uk/security/hakurei/pulls/1. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-15hst/enablement: editor friendly enablement adaptorOphestra
Having the bit field value here (in decimal, no less) is unfriendly to text editors. Use a bunch of booleans here to improve ease of use. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-15hst/fs: implement overlay fstypeOphestra
This finally exposes overlay mounts in the high level hakurei API. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-15nix: check config via hakureiOphestra
This is unfortunately the only feasible way of doing this in nix. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-08test/interactive: helper scripts for tracingOphestra
The vm state is discarded often, and it is quite cumbersome to set everything up again when the shell history is gone. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-07nix: make src overlay writableOphestra
The lowerdir is in the nix store. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-07nix: interactive nixos vmOphestra
This is useful for quickly spinning up an ephemeral hakurei environment for testing changes or reproducing vm test failures. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-03container/ops: mount dev readonlyOphestra
There is usually no good reason to write to /dev. This however doesn't work in internal/app because FilesystemConfig supplied by ContainerConfig might add entries to /dev, so internal/app follows DevWritable with Remount instead. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-01app: remount root readonlyOphestra
This does nothing for security, but should help avoid hiding bugs of programs developed in a hakurei container. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-01nix: remove nscd coverOphestra
This is a pd workaround that does nothing in the nixos module. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-01hst/container: mount tmpfs via magic src stringOphestra
There's often good reason to mount tmpfs in the container. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-01container/mount: pass tmpfs flagsOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-01app: integrate container autorootOphestra
Doing this instead of mounting directly on / because it's impossible to ensure a parent is available for every path hakurei wants to mount to. This situation is similar to autoetc hence the similar name, however a symlink mirror will not work in this case. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-01test/sandbox: check pd behaviourOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-31test: increase vm memoryOphestra
This hopefully fixes the intermittent failures. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-29hst: configurable wait delayOphestra
This is useful for programs that take a long time to clean up. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-29app: integrate interrupt forwardingOphestra
This significantly increases usability of command line tools running through hakurei. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-28app/shim: implement signal handler outcome in GoOphestra
This needs to be done from the Go side eventually anyway to integrate the signal forwarding behaviour now supported by the container package. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-26nix: update flake lockOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-09test/sandbox: add arm64 constantsOphestra
Most of these are differences in qemu. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-09test/sandbox: verify seccomp on all test casesOphestra
This change also makes seccomp hashes cross-platform. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-07test/sandbox: guard on testtool tagOphestra
This tool should not show up when building hakurei normally. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-07test/sandbox/seccomp: remove uselibOphestra
This syscall is not wired on all platforms. This test barely does anything anyway and seccomp is covered by the privileged test instrumentation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-03treewide: migrate to hakurei.appOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-06-25treewide: rename to hakureiOphestra
Fortify makes little sense for a container tool. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-06-08app: share runtime dirOphestra
This allows apps with the same identity to access the same runtime dir. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-06-08nix: deduplicate home-manager mergingOphestra
This becomes a problem when extraHomeConfig defines nixos module options. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-06-07nix: go generate in src derivationOphestra
This saves the generated files in the nix store and exposes them for use by external tools. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-06-05nix: update flake lockOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-05-25nix: use reverse-DNS style id as unique identifierOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-05-16nix: improve common usabilityOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-05-07nix: update flake lockOphestra
2025-04-15test: check xdg-dbus-proxy terminationOphestra
This process runs outside the application container's pid namespace, so it is a good idea to check whether its lifecycle becomes decoupled from the application. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-13fst: improve configOphestra
The config struct more or less "grew" to what it is today. This change moves things around to make more sense and fixes nonsensical comments describing obsolete behaviour. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-11fst: mount passthrough /dev writableOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>