985c4dd2fc
system/xhost: wrap revert error correctly
...
This otherwise creates a confusing error message on a revert failure.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-08 04:17:39 +09:00
da2b9c01ce
system/tmpfiles: do not fail for smaller files
...
The limit is meant to be an upper bound. Handle EOF and print verbose message for it instead of failing.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-08 03:22:10 +09:00
323d132c40
system/mkdir: use syscall dispatcher
...
This enables mkdir op methods to be instrumented.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-06 22:30:08 +09:00
6cc2b406a4
system/link: use syscall dispatcher
...
This enables hardlink op methods to be instrumented.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-06 19:47:58 +09:00
fcd0f2ede7
system/output: pass through LinkError
...
This has similar formatting to PathError.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-06 17:41:06 +09:00
e68db7fbfc
system: unexport Op implementations
...
None of these are valid with their zero value, and the implementations assume they are created by the builder methods. They are by all means an implementation detail and exporting them makes no sense.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-06 16:16:03 +09:00
ac81cfbedc
system/dbus: print incomplete string in buffer
...
Not sure if this will ever be reached, but nice to have nonetheless.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-06 15:50:29 +09:00
05db06c87b
system/dbus: use syscall dispatcher
...
This allows dbus op methods and builder to be instrumented.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-06 14:25:19 +09:00
e603b688ca
system/dispatcher: expose test reporting to builder
...
This is currently unused but useful for builders with errors.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-06 12:59:33 +09:00
a9def08533
system/dbus: drop proxy output beyond threshold
...
This prevents xdg-dbus-proxy from running the priv process out of memory.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-06 02:56:21 +09:00
ecaf43358d
system/dbus: create context in subtest
...
This is causing a huge amount of spurious test failures due to the poor performance of the integration vm. This should finally put an end to the annoyance.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-05 05:15:40 +09:00
197fa65b8f
system/dbus: remove redundant proxy pairs
...
This is left over from before dbus.Final. Remove them now as they serve no purpose.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-05 02:07:56 +09:00
e81a45e849
container/dispatcher: optional stub wait4 signal association
...
This synchronises the wait4 return after the toplevel signal call in lowlastcap_signaled_cancel_forward_error.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-04 20:28:49 +09:00
3920acf8c2
container/stub: remove function call in handleExit
...
This gets inlined and does not cause problems usually but turns out -coverpkg uninlines it and breaks the recovery.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-04 19:39:12 +09:00
19630a9593
container/dispatcher: remove wait4 test log
...
Turns out the reporting methods are not safe for concurrent use, despite the claim in testing.T doc comment.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-04 05:30:57 +09:00
4051577d6b
container/stub: override goexit methods
...
FailNow, Fatal, Fatalf, SkipNow, Skip and Skipf must be called from the goroutine created by the test.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-04 04:51:49 +09:00
ddfb865e2d
system/dispatcher: wrap syscall helper functions
...
This allows tests to stub all kernel behaviour, like in the container package.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-04 04:15:25 +09:00
024d2ff782
system: improve tests of the I struct
...
This cleans up for the test overhaul of this package.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-03 02:16:10 +09:00
6f719bc3c1
system: update doc commands and remove mutex
...
The mutex is not really doing anything, none of these methods make sense when called concurrently anyway. The copylocks analysis is still satisfied by the noCopy struct.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-02 04:54:34 +09:00
1b5d20a39b
container/dispatcher: stub.Call initialisation helper function
...
This keeps composites analysis happy without making the test cases (too) bloated.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-02 04:44:08 +09:00
49600a6f46
container/stub: export stub helpers
...
These are very useful in many packages containing relatively large amount of code making calls to difficult or impossible to stub functions.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-31 23:11:25 +09:00
b489a3bba1
system/output: implement MessageError
...
This error is also formatted differently based on state.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-31 13:51:21 +09:00
780e3e5465
container/msg: optionally provide error messages
...
This makes handling of fatal errors a lot less squirmy.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-31 11:57:59 +09:00
712cfc06d7
container: wrap container init start errors
...
This helps indicate the exact origin and nature of the error. This eliminates generic WrapErr from container.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-30 23:44:48 +09:00
f5abce9df5
system: wrap op errors
...
This passes more information allowing for better error handling. This eliminates generic WrapErr from system.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-30 22:49:12 +09:00
ddb003e39b
system/internal/xcb: refactor and clean up
...
This package still does not deserve to be out of internal, but at least it is less haunting now. I am still not handling the xcb error though, the struct is almost entirely undocumented and the implementation is unreadable. Not even going to try.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-30 20:02:18 +09:00
b12c290f12
system/wayland: improve error descriptions
...
A lot of these errors have very short and nondescript descriptions. These are only returned on incorrect API usage, but it makes sense to make them more descriptive anyway.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-30 16:51:40 +09:00
0122593312
system/acl: wrap libacl errors in PathError
...
This helps determine which libacl function the errno came from.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-30 13:19:15 +09:00
6aa431d57a
system/acl: update test log messages
...
Most of these were never updated after UpdatePerm was renamed to Update.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-30 12:55:49 +09:00
08eeafe817
container/mount: unwrap vfs decoder errors
...
These are now handled by init. This eliminates generic WrapErr from mount and procPaths.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 22:15:05 +09:00
d7c7c69a13
container/dispatcher: check simple test errors via reflect
...
Again, avoids the errors package concealing unexpected behaviours.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 22:12:21 +09:00
50972096cd
container/vfs: wrap decoder errors
...
This passes line information and handles strconv errors so it reads better.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 21:51:31 +09:00
905b9f9785
container/initoverlay: invalid argument type
...
This eliminates generic WrapErr from overlay.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 02:56:56 +09:00
1c7e634f09
container/dispatcher: check test errors via reflect
...
Using the errors package might conceal some incorrect behaviour.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 02:35:24 +09:00
8d472ebf2b
container/inittmpfs: unwrap out of bounds error
...
This eliminates generic WrapErr from tmpfs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 02:15:48 +09:00
4da6463135
container/init: unwrap path errors
...
These are also now handled by init properly, so wrapping them in self is meaningless and unreachable.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 02:04:09 +09:00
eb3385d490
container/initsymlink: unwrap mount errors
...
The mount function now wraps its own errors in a much more descriptive type with proper message formatting. Wrapping them no longer makes any sense.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 01:46:54 +09:00
b8669338da
container/initsymlink: unwrap absolute error
...
This is now handled properly by the init.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 01:43:11 +09:00
f24dd4ab8c
container/init: handle unwrapped errors
...
This is much cleaner from both the return statement and the error handling.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 01:37:13 +09:00
a462341a0a
container: repeat and impossible state types
...
This moves repeated Op errors and impossible internal state errors off of msg.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 01:12:02 +09:00
84ad9791e2
container: wrap mount syscall errno
...
This is the first step to deprecating the generalised error wrapping error message pattern.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 01:06:12 +09:00
b14690aa77
internal/app: remove seal interface
...
This further cleans up the package for the restructure.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-28 01:07:51 +09:00
d0b6852cd7
internal/app: remove app interface
...
It is very clear at this point that there will not be multiple implementations of App, and the internal/app package will never move out of internal due to hsu.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-28 00:54:44 +09:00
da0459aca1
internal/app: update doc comments
...
A lot of these comments are quite old and have not been updated to reflect changes.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-28 00:45:57 +09:00
1be8de6f5c
internal/app: less strict username regex
...
Use the default value of NAME_REGEX from adduser. Should not hurt compatibility while being less strict.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-28 00:22:55 +09:00
0f41d96671
internal: move sysconf wrapper to app
...
This should not be used and is not useful in other packages.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-28 00:04:58 +09:00
92f510a647
cmd/hakurei/command: pd run dbus-verbose nil check
...
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-09-06 00:09:25 +09:00
acb6931f3e
app/seal: leave $DISPLAY as is on host abstract
...
This helps work around faulty software that misinterprets unix: DISPLAY string.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-27 20:42:03 +09:00
9d932d1039
release: 0.2.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
v0.2.1
2025-08-26 03:33:45 +09:00
9bc8532d56
container/initdev: mount tmpfs on shm for ro dev
...
Programs expect /dev/shm to be a writable tmpfs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-26 03:27:07 +09:00