sandbox: create symlinks
All checks were successful
Test / Create distribution (push) Successful in 24s
Test / Fortify (push) Successful in 2m30s
Test / Fpkg (push) Successful in 3m21s
Test / Data race detector (push) Successful in 4m3s
Test / Flake checks (push) Successful in 48s

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-03-17 16:37:56 +09:00
parent 528674cb6e
commit af3619d440
4 changed files with 35 additions and 3 deletions

View File

@@ -67,7 +67,7 @@ func TestContainer(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
container := sandbox.New(ctx, os.Args[0], "-test.v",
container := sandbox.New(ctx, "/tmp/sandbox.test", "-test.v",
"-test.run=TestHelperCheckContainer", "--", "check", tc.host)
container.Uid = 1000
container.Gid = 100
@@ -86,7 +86,8 @@ func TestContainer(t *testing.T) {
container.
Tmpfs("/tmp", 0, 0755).
Bind(os.Args[0], os.Args[0], 0)
Bind(os.Args[0], os.Args[0], 0).
Link(os.Args[0], "/tmp/sandbox.test")
// in case test has cgo enabled
var libPaths []string
if entries, err := ldd.ExecFilter(ctx,