Skip to content

Conversation

@mtrmac
Copy link
Contributor

@mtrmac mtrmac commented Oct 3, 2025

Fixes #2712 . See individual commit messages for details.

@mtrmac mtrmac added the kind/bug A defect in an existing functionality (or a PR fixing it) label Oct 3, 2025
opts := fakeSharedCopyOptions(t, c.options)
res, cleanup, err := opts.copyOptions(&someStdout)
require.NoError(t, err)
defer cleanup()

Choose a reason for hiding this comment

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

LGTM

nit: defer cleanup() will run only after the loop finishes, is it possible to run the cleanup() at the end of each loop to avoid resources leaking or exhaustion?

Or is this anything that it needs to be kept there for re usage ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You’re right that the cleanup could be done earlier, and that it would be conceptually cleaner.

I don’t think it matters much either way here; this is a short-running test, and the loop iterations are all listed just above (5–6 of them).

The cost would be adding another func(){…}() nesting level — a very minor downside in readability.

@TomSweeneyRedHat
Copy link
Member

LGTM

@TomSweeneyRedHat
Copy link
Member

@aguidirh PTAL. If you give this a LGTM, we'll move it along.

Copy link

@aguidirh aguidirh left a comment

Choose a reason for hiding this comment

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

Hi @TomSweeneyRedHat,

LGTM, should I approve or give a specific label? Or is this responsibility of a specific person?

@TomSweeneyRedHat
Copy link
Member

@aguidirh "LGTM" works just fine, TYVM!

@TomSweeneyRedHat
Copy link
Member

/approve

@TomSweeneyRedHat
Copy link
Member

/lgtm

@mtrmac
Copy link
Contributor Author

mtrmac commented Oct 30, 2025

There is no merge bot here… just an (out-of-sync) GitHub list of user accounts allowed to click on the merge button.

Should not change (test) behavior.

Signed-off-by: Miloslav Trmač <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug A defect in an existing functionality (or a PR fixing it)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blank passphrase not allowed on signing key

3 participants