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())) }