From 8a3c3d145a560b91da1d9bce9070c20289b63502 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 7 May 2026 15:57:45 +0900 Subject: [PATCH] internal/pkg: correctly generate cure expects This needs to dereference the identifier symlink. Signed-off-by: Ophestra --- internal/pkg/pkg_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/pkg/pkg_test.go b/internal/pkg/pkg_test.go index 793b1e82..04bd665f 100644 --- a/internal/pkg/pkg_test.go +++ b/internal/pkg/pkg_test.go @@ -423,7 +423,7 @@ func checkWithCache(t *testing.T, testCases []cacheTestCase) { msg := message.New(log.New(os.Stderr, "cache: ", 0)) msg.SwapVerbose(testing.Verbose()) - flags := tc.flags + flags := tc.flags | pkg.CSuppressInit if info.CanDegrade { if _, err := landlock.GetABI(); err != nil { @@ -544,7 +544,11 @@ func cureMany(t *testing.T, c *pkg.Cache, steps []cureStep) { t.Fatalf("Cure: pathname = %q, want %q", pathname, step.pathname) } else if step.output == nil || checksum != makeChecksumH(step.output.hash()) { if pathname != nil { - t.Fatal(expectsFrom(pathname.String())) + if name, _err := filepath.EvalSymlinks(pathname.String()); _err != nil { + t.Fatal(_err) + } else { + t.Fatal(expectsFrom(name)) + } } else if checksum != (unique.Handle[pkg.Checksum]{}) { t.Fatalf("Cure: unexpected checksum %s", pkg.Encode(checksum.Value())) }