system/dispatcher: expose test reporting to builder
All checks were successful
Test / Create distribution (push) Successful in 33s
Test / Sandbox (push) Successful in 2m14s
Test / Hakurei (push) Successful in 3m10s
Test / Hpkg (push) Successful in 3m50s
Test / Sandbox (race detector) (push) Successful in 4m22s
Test / Hakurei (race detector) (push) Successful in 5m4s
Test / Flake checks (push) Successful in 1m23s
All checks were successful
Test / Create distribution (push) Successful in 33s
Test / Sandbox (push) Successful in 2m14s
Test / Hakurei (push) Successful in 3m10s
Test / Hpkg (push) Successful in 3m50s
Test / Sandbox (race detector) (push) Successful in 4m22s
Test / Hakurei (race detector) (push) Successful in 5m4s
Test / Flake checks (push) Successful in 1m23s
This is currently unused but useful for builders with errors. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
a9def08533
commit
e603b688ca
@ -57,7 +57,7 @@ func TestACLUpdateOp(t *testing.T) {
|
|||||||
checkOpsBuilder(t, "UpdatePerm", []opsBuilderTestCase{
|
checkOpsBuilder(t, "UpdatePerm", []opsBuilderTestCase{
|
||||||
{"simple",
|
{"simple",
|
||||||
0xdeadbeef,
|
0xdeadbeef,
|
||||||
func(sys *I) {
|
func(_ *testing.T, sys *I) {
|
||||||
sys.
|
sys.
|
||||||
UpdatePerm("/run/user/1971/hakurei", acl.Execute).
|
UpdatePerm("/run/user/1971/hakurei", acl.Execute).
|
||||||
UpdatePerm("/tmp/hakurei.0/tmpdir/150", acl.Read, acl.Write, acl.Execute)
|
UpdatePerm("/tmp/hakurei.0/tmpdir/150", acl.Read, acl.Write, acl.Execute)
|
||||||
@ -67,25 +67,25 @@ func TestACLUpdateOp(t *testing.T) {
|
|||||||
}, stub.Expect{}},
|
}, stub.Expect{}},
|
||||||
})
|
})
|
||||||
checkOpsBuilder(t, "UpdatePermType", []opsBuilderTestCase{
|
checkOpsBuilder(t, "UpdatePermType", []opsBuilderTestCase{
|
||||||
{"tmpdirp", 0xdeadbeef, func(sys *I) {
|
{"tmpdirp", 0xdeadbeef, func(_ *testing.T, sys *I) {
|
||||||
sys.UpdatePermType(User, "/tmp/hakurei.0/tmpdir", acl.Execute)
|
sys.UpdatePermType(User, "/tmp/hakurei.0/tmpdir", acl.Execute)
|
||||||
}, []Op{
|
}, []Op{
|
||||||
&ACLUpdateOp{User, "/tmp/hakurei.0/tmpdir", []acl.Perm{acl.Execute}},
|
&ACLUpdateOp{User, "/tmp/hakurei.0/tmpdir", []acl.Perm{acl.Execute}},
|
||||||
}, stub.Expect{}},
|
}, stub.Expect{}},
|
||||||
|
|
||||||
{"tmpdir", 0xdeadbeef, func(sys *I) {
|
{"tmpdir", 0xdeadbeef, func(_ *testing.T, sys *I) {
|
||||||
sys.UpdatePermType(User, "/tmp/hakurei.0/tmpdir/150", acl.Read, acl.Write, acl.Execute)
|
sys.UpdatePermType(User, "/tmp/hakurei.0/tmpdir/150", acl.Read, acl.Write, acl.Execute)
|
||||||
}, []Op{
|
}, []Op{
|
||||||
&ACLUpdateOp{User, "/tmp/hakurei.0/tmpdir/150", []acl.Perm{acl.Read, acl.Write, acl.Execute}},
|
&ACLUpdateOp{User, "/tmp/hakurei.0/tmpdir/150", []acl.Perm{acl.Read, acl.Write, acl.Execute}},
|
||||||
}, stub.Expect{}},
|
}, stub.Expect{}},
|
||||||
|
|
||||||
{"share", 0xdeadbeef, func(sys *I) {
|
{"share", 0xdeadbeef, func(_ *testing.T, sys *I) {
|
||||||
sys.UpdatePermType(Process, "/run/user/1971/hakurei/fcb8a12f7c482d183ade8288c3de78b5", acl.Execute)
|
sys.UpdatePermType(Process, "/run/user/1971/hakurei/fcb8a12f7c482d183ade8288c3de78b5", acl.Execute)
|
||||||
}, []Op{
|
}, []Op{
|
||||||
&ACLUpdateOp{Process, "/run/user/1971/hakurei/fcb8a12f7c482d183ade8288c3de78b5", []acl.Perm{acl.Execute}},
|
&ACLUpdateOp{Process, "/run/user/1971/hakurei/fcb8a12f7c482d183ade8288c3de78b5", []acl.Perm{acl.Execute}},
|
||||||
}, stub.Expect{}},
|
}, stub.Expect{}},
|
||||||
|
|
||||||
{"passwd", 0xdeadbeef, func(sys *I) {
|
{"passwd", 0xdeadbeef, func(_ *testing.T, sys *I) {
|
||||||
sys.
|
sys.
|
||||||
UpdatePermType(Process, "/tmp/hakurei.0/fcb8a12f7c482d183ade8288c3de78b5/passwd", acl.Read).
|
UpdatePermType(Process, "/tmp/hakurei.0/fcb8a12f7c482d183ade8288c3de78b5/passwd", acl.Read).
|
||||||
UpdatePermType(Process, "/tmp/hakurei.0/fcb8a12f7c482d183ade8288c3de78b5/group", acl.Read)
|
UpdatePermType(Process, "/tmp/hakurei.0/fcb8a12f7c482d183ade8288c3de78b5/group", acl.Read)
|
||||||
@ -94,7 +94,7 @@ func TestACLUpdateOp(t *testing.T) {
|
|||||||
&ACLUpdateOp{Process, "/tmp/hakurei.0/fcb8a12f7c482d183ade8288c3de78b5/group", []acl.Perm{acl.Read}},
|
&ACLUpdateOp{Process, "/tmp/hakurei.0/fcb8a12f7c482d183ade8288c3de78b5/group", []acl.Perm{acl.Read}},
|
||||||
}, stub.Expect{}},
|
}, stub.Expect{}},
|
||||||
|
|
||||||
{"wayland", 0xdeadbeef, func(sys *I) {
|
{"wayland", 0xdeadbeef, func(_ *testing.T, sys *I) {
|
||||||
sys.UpdatePermType(EWayland, "/run/user/1971/wayland-0", acl.Read, acl.Write, acl.Execute)
|
sys.UpdatePermType(EWayland, "/run/user/1971/wayland-0", acl.Read, acl.Write, acl.Execute)
|
||||||
}, []Op{
|
}, []Op{
|
||||||
&ACLUpdateOp{EWayland, "/run/user/1971/wayland-0", []acl.Perm{acl.Read, acl.Write, acl.Execute}},
|
&ACLUpdateOp{EWayland, "/run/user/1971/wayland-0", []acl.Perm{acl.Read, acl.Write, acl.Execute}},
|
||||||
|
@ -75,7 +75,7 @@ func checkOpBehaviour(t *testing.T, testCases []opBehaviourTestCase) {
|
|||||||
type opsBuilderTestCase struct {
|
type opsBuilderTestCase struct {
|
||||||
name string
|
name string
|
||||||
uid int
|
uid int
|
||||||
f func(sys *I)
|
f func(t *testing.T, sys *I)
|
||||||
want []Op
|
want []Op
|
||||||
exp stub.Expect
|
exp stub.Expect
|
||||||
}
|
}
|
||||||
@ -92,7 +92,7 @@ func checkOpsBuilder(t *testing.T, fname string, testCases []opsBuilderTestCase)
|
|||||||
|
|
||||||
sys, s := InternalNew(t, tc.exp, tc.uid)
|
sys, s := InternalNew(t, tc.exp, tc.uid)
|
||||||
defer stub.HandleExit(t)
|
defer stub.HandleExit(t)
|
||||||
tc.f(sys)
|
tc.f(t, sys)
|
||||||
s.VisitIncomplete(func(s *stub.Stub[syscallDispatcher]) {
|
s.VisitIncomplete(func(s *stub.Stub[syscallDispatcher]) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user