hst: optionally cover /run/ early
Test / Create distribution (push) Successful in 53s
Test / Sandbox (push) Successful in 2m44s
Test / ShareFS (push) Successful in 3m57s
Test / Hakurei (push) Successful in 4m0s
Test / Sandbox (race detector) (push) Successful in 5m30s
Test / Hakurei (race detector) (push) Successful in 6m38s
Test / Flake checks (push) Successful in 1m12s
Test / Create distribution (push) Successful in 53s
Test / Sandbox (push) Successful in 2m44s
Test / ShareFS (push) Successful in 3m57s
Test / Hakurei (push) Successful in 4m0s
Test / Sandbox (race detector) (push) Successful in 5m30s
Test / Hakurei (race detector) (push) Successful in 6m38s
Test / Flake checks (push) Successful in 1m12s
This works around awkward root permissions. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -136,6 +136,7 @@ func TestOutcomeRun(t *testing.T) {
|
||||
Tmpfs(fhs.AbsDevShm, 0, 01777).
|
||||
|
||||
// spRuntimeOp
|
||||
Tmpfs(fhs.AbsRun, xdgRuntimeDirSize, 0755).
|
||||
Tmpfs(fhs.AbsRunUser, xdgRuntimeDirSize, 0755).
|
||||
Bind(m("/tmp/hakurei.0/runtime/9"), m("/run/user/1971"), std.BindWritable).
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ func TestShimEntrypoint(t *testing.T) {
|
||||
Tmpfs(fhs.AbsDevShm, 0, 01777).
|
||||
|
||||
// spRuntimeOp
|
||||
Tmpfs(fhs.AbsRun, xdgRuntimeDirSize, 0755).
|
||||
Tmpfs(fhs.AbsRunUser, xdgRuntimeDirSize, 0755).
|
||||
Bind(m("/tmp/hakurei.10/runtime/9999"), m("/run/user/1000"), std.BindWritable).
|
||||
|
||||
|
||||
@@ -113,6 +113,9 @@ func (s *spRuntimeOp) toContainer(state *outcomeStateParams) error {
|
||||
|
||||
}
|
||||
|
||||
if state.Container.Flags&hst.FCoverRun != 0 {
|
||||
state.params.Tmpfs(fhs.AbsRun, xdgRuntimeDirSize, 0755)
|
||||
}
|
||||
state.params.Tmpfs(fhs.AbsRunUser, xdgRuntimeDirSize, 0755)
|
||||
if state.Container.Flags&hst.FShareRuntime != 0 {
|
||||
_, runtimeDirInst := s.commonPaths(state.outcomeState)
|
||||
|
||||
@@ -40,6 +40,7 @@ func TestSpRuntimeOp(t *testing.T) {
|
||||
// this op configures the container state and does not make calls during toContainer
|
||||
}, &container.Params{
|
||||
Ops: new(container.Ops).
|
||||
Tmpfs(fhs.AbsRun, xdgRuntimeDirSize, 0755).
|
||||
Tmpfs(fhs.AbsRunUser, xdgRuntimeDirSize, 0755).
|
||||
Bind(m("/proc/nonexistent/tmp/hakurei.0/runtime/9"), m("/run/user/1000"), std.BindWritable),
|
||||
}, paramsWantEnv(config, map[string]string{
|
||||
@@ -67,6 +68,7 @@ func TestSpRuntimeOp(t *testing.T) {
|
||||
// this op configures the container state and does not make calls during toContainer
|
||||
}, &container.Params{
|
||||
Ops: new(container.Ops).
|
||||
Tmpfs(fhs.AbsRun, xdgRuntimeDirSize, 0755).
|
||||
Tmpfs(fhs.AbsRunUser, xdgRuntimeDirSize, 0755).
|
||||
Bind(m("/proc/nonexistent/tmp/hakurei.0/runtime/9"), m("/run/user/1000"), std.BindWritable),
|
||||
}, paramsWantEnv(config, map[string]string{
|
||||
@@ -94,6 +96,7 @@ func TestSpRuntimeOp(t *testing.T) {
|
||||
// this op configures the container state and does not make calls during toContainer
|
||||
}, &container.Params{
|
||||
Ops: new(container.Ops).
|
||||
Tmpfs(fhs.AbsRun, xdgRuntimeDirSize, 0755).
|
||||
Tmpfs(fhs.AbsRunUser, xdgRuntimeDirSize, 0755).
|
||||
Bind(m("/proc/nonexistent/tmp/hakurei.0/runtime/9"), m("/run/user/1000"), std.BindWritable),
|
||||
}, paramsWantEnv(config, map[string]string{
|
||||
@@ -117,6 +120,7 @@ func TestSpRuntimeOp(t *testing.T) {
|
||||
// this op configures the container state and does not make calls during toContainer
|
||||
}, &container.Params{
|
||||
Ops: new(container.Ops).
|
||||
Tmpfs(fhs.AbsRun, xdgRuntimeDirSize, 0755).
|
||||
Tmpfs(fhs.AbsRunUser, xdgRuntimeDirSize, 0755).
|
||||
Bind(m("/proc/nonexistent/tmp/hakurei.0/runtime/9"), m("/run/user/1000"), std.BindWritable),
|
||||
}, paramsWantEnv(config, map[string]string{
|
||||
|
||||
Reference in New Issue
Block a user