diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-11-14 21:59:59 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-11-14 21:59:59 +0900 |
| commit | 47244daefb80479c6e006b4e4687432ba6fc9608 (patch) | |
| tree | ee4c977bf02fb094aee33332291d3fc8c8f2ad84 /container | |
| parent | 46fa1044195ed1e98f3b27cadbad4f8153f7977d (diff) | |
treewide: migrate ldd callers
This discontinues use of the deprecated ldd.Exec function for #25.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container')
| -rw-r--r-- | container/container_test.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/container/container_test.go b/container/container_test.go index ecd3a1d7..d737a184 100644 --- a/container/container_test.go +++ b/container/container_test.go @@ -762,12 +762,14 @@ func TestMain(m *testing.M) { func helperNewContainerLibPaths(ctx context.Context, libPaths *[]*check.Absolute, args ...string) (c *container.Container) { msg := message.New(nil) msg.SwapVerbose(testing.Verbose()) + executable := check.MustAbs(container.MustExecutable(msg)) + c = container.NewCommand(ctx, msg, absHelperInnerPath, "helper", args...) c.Env = append(c.Env, envDoCheck+"=1") - c.Bind(check.MustAbs(os.Args[0]), absHelperInnerPath, 0) + c.Bind(executable, absHelperInnerPath, 0) // in case test has cgo enabled - if entries, err := ldd.Exec(ctx, msg, os.Args[0]); err != nil { + if entries, err := ldd.Resolve(ctx, msg, executable); err != nil { log.Fatalf("ldd: %v", err) } else { *libPaths = ldd.Path(entries) |
