treewide: import internal/system
All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (push) Successful in 2m18s
Test / Hakurei (push) Successful in 3m15s
Test / Hpkg (push) Successful in 4m12s
Test / Sandbox (race detector) (push) Successful in 4m16s
Test / Hakurei (race detector) (push) Successful in 5m8s
Test / Flake checks (push) Successful in 1m31s
All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (push) Successful in 2m18s
Test / Hakurei (push) Successful in 3m15s
Test / Hpkg (push) Successful in 4m12s
Test / Sandbox (race detector) (push) Successful in 4m16s
Test / Hakurei (race detector) (push) Successful in 5m8s
Test / Flake checks (push) Successful in 1m31s
For #24. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
4e7aab07d5
commit
bf5d10743f
@ -20,8 +20,8 @@ import (
|
||||
"hakurei.app/internal"
|
||||
"hakurei.app/internal/env"
|
||||
"hakurei.app/internal/outcome"
|
||||
"hakurei.app/internal/system/dbus"
|
||||
"hakurei.app/message"
|
||||
"hakurei.app/system/dbus"
|
||||
)
|
||||
|
||||
//go:linkname optionalErrorUnwrap hakurei.app/container.optionalErrorUnwrap
|
||||
|
||||
@ -15,8 +15,8 @@ import (
|
||||
"hakurei.app/container/seccomp"
|
||||
"hakurei.app/container/std"
|
||||
"hakurei.app/internal"
|
||||
"hakurei.app/internal/system/dbus"
|
||||
"hakurei.app/message"
|
||||
"hakurei.app/system/dbus"
|
||||
)
|
||||
|
||||
// osFile represents [os.File].
|
||||
|
||||
@ -24,8 +24,8 @@ import (
|
||||
"hakurei.app/container/std"
|
||||
"hakurei.app/container/stub"
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/internal/system"
|
||||
"hakurei.app/message"
|
||||
"hakurei.app/system"
|
||||
)
|
||||
|
||||
// call initialises a [stub.Call].
|
||||
|
||||
@ -8,8 +8,8 @@ import (
|
||||
"os/user"
|
||||
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/internal/system"
|
||||
"hakurei.app/message"
|
||||
"hakurei.app/system"
|
||||
)
|
||||
|
||||
func newWithMessage(msg string) error { return newWithMessageError(msg, os.ErrInvalid) }
|
||||
|
||||
@ -21,10 +21,10 @@ import (
|
||||
"hakurei.app/container/seccomp"
|
||||
"hakurei.app/container/std"
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/internal/system"
|
||||
"hakurei.app/internal/system/acl"
|
||||
"hakurei.app/internal/system/dbus"
|
||||
"hakurei.app/message"
|
||||
"hakurei.app/system"
|
||||
"hakurei.app/system/acl"
|
||||
"hakurei.app/system/dbus"
|
||||
)
|
||||
|
||||
func TestOutcomeMain(t *testing.T) {
|
||||
|
||||
@ -10,9 +10,9 @@ import (
|
||||
"hakurei.app/container/check"
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/internal/env"
|
||||
"hakurei.app/internal/system"
|
||||
"hakurei.app/internal/system/acl"
|
||||
"hakurei.app/message"
|
||||
"hakurei.app/system"
|
||||
"hakurei.app/system/acl"
|
||||
)
|
||||
|
||||
// envAllocSize is the initial size of the env map pre-allocated when the configured env map is nil.
|
||||
|
||||
@ -18,8 +18,8 @@ import (
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/internal"
|
||||
"hakurei.app/internal/store"
|
||||
"hakurei.app/internal/system"
|
||||
"hakurei.app/message"
|
||||
"hakurei.app/system"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@ -16,11 +16,11 @@ import (
|
||||
"hakurei.app/container/seccomp"
|
||||
"hakurei.app/container/std"
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/internal/system"
|
||||
"hakurei.app/internal/system/acl"
|
||||
"hakurei.app/internal/system/dbus"
|
||||
"hakurei.app/internal/validate"
|
||||
"hakurei.app/message"
|
||||
"hakurei.app/system"
|
||||
"hakurei.app/system/acl"
|
||||
"hakurei.app/system/dbus"
|
||||
)
|
||||
|
||||
const varRunNscd = fhs.Var + "run/nscd"
|
||||
|
||||
@ -14,9 +14,9 @@ import (
|
||||
"hakurei.app/container/std"
|
||||
"hakurei.app/container/stub"
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/system"
|
||||
"hakurei.app/system/acl"
|
||||
"hakurei.app/system/dbus"
|
||||
"hakurei.app/internal/system"
|
||||
"hakurei.app/internal/system/acl"
|
||||
"hakurei.app/internal/system/dbus"
|
||||
)
|
||||
|
||||
func TestSpParamsOp(t *testing.T) {
|
||||
|
||||
@ -5,8 +5,8 @@ import (
|
||||
|
||||
"hakurei.app/container/fhs"
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/system/acl"
|
||||
"hakurei.app/system/dbus"
|
||||
"hakurei.app/internal/system/acl"
|
||||
"hakurei.app/internal/system/dbus"
|
||||
)
|
||||
|
||||
func init() { gob.Register(new(spDBusOp)) }
|
||||
|
||||
@ -8,10 +8,10 @@ import (
|
||||
"hakurei.app/container/stub"
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/internal/helper"
|
||||
"hakurei.app/internal/system"
|
||||
"hakurei.app/internal/system/acl"
|
||||
"hakurei.app/internal/system/dbus"
|
||||
"hakurei.app/message"
|
||||
"hakurei.app/system"
|
||||
"hakurei.app/system/acl"
|
||||
"hakurei.app/system/dbus"
|
||||
)
|
||||
|
||||
func TestSpDBusOp(t *testing.T) {
|
||||
|
||||
@ -11,8 +11,8 @@ import (
|
||||
"hakurei.app/container/check"
|
||||
"hakurei.app/container/stub"
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/system"
|
||||
"hakurei.app/system/acl"
|
||||
"hakurei.app/internal/system"
|
||||
"hakurei.app/internal/system/acl"
|
||||
)
|
||||
|
||||
func TestSpPulseOp(t *testing.T) {
|
||||
|
||||
@ -7,8 +7,8 @@ import (
|
||||
"hakurei.app/container/fhs"
|
||||
"hakurei.app/container/std"
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/system"
|
||||
"hakurei.app/system/acl"
|
||||
"hakurei.app/internal/system"
|
||||
"hakurei.app/internal/system/acl"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@ -8,8 +8,8 @@ import (
|
||||
"hakurei.app/container/std"
|
||||
"hakurei.app/container/stub"
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/system"
|
||||
"hakurei.app/system/acl"
|
||||
"hakurei.app/internal/system"
|
||||
"hakurei.app/internal/system/acl"
|
||||
)
|
||||
|
||||
func TestSpRuntimeOp(t *testing.T) {
|
||||
|
||||
@ -7,8 +7,8 @@ import (
|
||||
"hakurei.app/container/fhs"
|
||||
"hakurei.app/container/std"
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/system"
|
||||
"hakurei.app/system/acl"
|
||||
"hakurei.app/internal/system"
|
||||
"hakurei.app/internal/system/acl"
|
||||
)
|
||||
|
||||
func init() { gob.Register(spTmpdirOp{}) }
|
||||
|
||||
@ -8,8 +8,8 @@ import (
|
||||
"hakurei.app/container/std"
|
||||
"hakurei.app/container/stub"
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/system"
|
||||
"hakurei.app/system/acl"
|
||||
"hakurei.app/internal/system"
|
||||
"hakurei.app/internal/system/acl"
|
||||
)
|
||||
|
||||
func TestSpTmpdirOp(t *testing.T) {
|
||||
|
||||
@ -5,8 +5,8 @@ import (
|
||||
|
||||
"hakurei.app/container/check"
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/system/acl"
|
||||
"hakurei.app/system/wayland"
|
||||
"hakurei.app/internal/system/acl"
|
||||
"hakurei.app/internal/system/wayland"
|
||||
)
|
||||
|
||||
func init() { gob.Register(new(spWaylandOp)) }
|
||||
@ -25,8 +25,8 @@ func (s *spWaylandOp) toSystem(state *outcomeStateSys) error {
|
||||
|
||||
// outer wayland socket (usually `/run/user/%d/wayland-%d`)
|
||||
var socketPath *check.Absolute
|
||||
if name, ok := state.k.lookupEnv(wayland.WaylandDisplay); !ok {
|
||||
state.msg.Verbose(wayland.WaylandDisplay + " is not set, assuming " + wayland.FallbackName)
|
||||
if name, ok := state.k.lookupEnv(wayland.Display); !ok {
|
||||
state.msg.Verbose(wayland.Display + " is not set, assuming " + wayland.FallbackName)
|
||||
socketPath = state.sc.RuntimePath.Append(wayland.FallbackName)
|
||||
} else if a, err := check.NewAbs(name); err != nil {
|
||||
socketPath = state.sc.RuntimePath.Append(name)
|
||||
@ -53,7 +53,7 @@ func (s *spWaylandOp) toSystem(state *outcomeStateSys) error {
|
||||
|
||||
func (s *spWaylandOp) toContainer(state *outcomeStateParams) error {
|
||||
innerPath := state.runtimeDir.Append(wayland.FallbackName)
|
||||
state.env[wayland.WaylandDisplay] = wayland.FallbackName
|
||||
state.env[wayland.Display] = wayland.FallbackName
|
||||
if s.SocketPath == nil {
|
||||
state.params.Bind(state.instancePath().Append("wayland"), innerPath, 0)
|
||||
} else {
|
||||
|
||||
@ -6,9 +6,9 @@ import (
|
||||
"hakurei.app/container"
|
||||
"hakurei.app/container/stub"
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/system"
|
||||
"hakurei.app/system/acl"
|
||||
"hakurei.app/system/wayland"
|
||||
"hakurei.app/internal/system"
|
||||
"hakurei.app/internal/system/acl"
|
||||
"hakurei.app/internal/system/wayland"
|
||||
)
|
||||
|
||||
func TestSpWaylandOp(t *testing.T) {
|
||||
@ -47,7 +47,7 @@ func TestSpWaylandOp(t *testing.T) {
|
||||
Ops: new(container.Ops).
|
||||
Bind(m(wantInstancePrefix+"/wayland"), m("/run/user/1000/wayland-0"), 0),
|
||||
}, paramsWantEnv(config, map[string]string{
|
||||
wayland.WaylandDisplay: wayland.FallbackName,
|
||||
wayland.Display: wayland.FallbackName,
|
||||
}, nil), nil},
|
||||
|
||||
{"success direct", func(isShim, _ bool) outcomeOp {
|
||||
@ -75,7 +75,7 @@ func TestSpWaylandOp(t *testing.T) {
|
||||
Ops: new(container.Ops).
|
||||
Bind(m("/proc/nonexistent/wayland"), m("/run/user/1000/wayland-0"), 0),
|
||||
}, paramsWantEnv(config, map[string]string{
|
||||
wayland.WaylandDisplay: wayland.FallbackName,
|
||||
wayland.Display: wayland.FallbackName,
|
||||
}, nil), nil},
|
||||
|
||||
{"success", func(bool, bool) outcomeOp {
|
||||
@ -98,7 +98,7 @@ func TestSpWaylandOp(t *testing.T) {
|
||||
Ops: new(container.Ops).
|
||||
Bind(m(wantInstancePrefix+"/wayland"), m("/run/user/1000/wayland-0"), 0),
|
||||
}, paramsWantEnv(config, map[string]string{
|
||||
wayland.WaylandDisplay: wayland.FallbackName,
|
||||
wayland.Display: wayland.FallbackName,
|
||||
}, nil), nil},
|
||||
})
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
"hakurei.app/container/check"
|
||||
"hakurei.app/container/fhs"
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/system/acl"
|
||||
"hakurei.app/internal/system/acl"
|
||||
)
|
||||
|
||||
var absX11SocketDir = fhs.AbsTmp.Append(".X11-unix")
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"hakurei.app/container"
|
||||
"hakurei.app/container/stub"
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/system/acl"
|
||||
"hakurei.app/internal/system/acl"
|
||||
)
|
||||
|
||||
func TestSpX11Op(t *testing.T) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user