Skip to content

Conversation

@phbnf
Copy link
Contributor

@phbnf phbnf commented Dec 5, 2025

Bug discovered while investigating transparency-dev/tesseract#644.

Before this PR, Tessera was using layout.EntriesPath, but Tessera might have been configured to use a different path for entries.

@phbnf phbnf requested a review from AlCutter December 5, 2025 13:46
@phbnf phbnf force-pushed the GB-re-entry branch 3 times, most recently from cbd31ec to d0d22c7 Compare December 5, 2025 18:41
@phbnf phbnf marked this pull request as ready for review December 8, 2025 12:25
@phbnf phbnf requested a review from a team as a code owner December 8, 2025 12:25
Comment on lines +644 to +645

// Grow the tree several times to check continued correct operation over lifetime of the log.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels like it should be possible to extract the stuff below out to a testonly.RunGCTest(t, ...) and make this be more of a black-box "all storages should behave consistently w.r.t. GC" type test.

We've talked in the past about perhaps coming at these sorts of things via a higher-level conformance suite which could run against the conformance binaries, maybe that's a better story.

Anyway, mostly just making a note here from the IRL conversations for posterity.

Copy link
Collaborator

@AlCutter AlCutter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of little nits/questions.

@@ -0,0 +1,68 @@
// Copyright 2024 The Tessera authors. All Rights Reserved.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Copyright 2024 The Tessera authors. All Rights Reserved.
// Copyright 2025 The Tessera authors. All Rights Reserved.

content, err := os.ReadFile(path)
if err != nil {
t.Logf("Could not read %s: %v", path, err)
return nil // Don't fail the test if a file is unreadable, just skip
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not fail the test?


// Check for the forbidden string
if strings.Contains(string(content), forbiddenName) {
t.Errorf("\n[FAIL] Found forbidden call '%s' in file: %s", forbiddenName, path)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unusual looking log format string :)

  • leading \n
  • a [FAIL] should automatically be generated for the test as a whole since Errorf was called (albeit elsewhere in the log)
  • %s --> %q

@phbnf phbnf merged commit cd1dadb into transparency-dev:main Dec 8, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants