Skip to content

fuzz-tests: Improve the fuzz-bolt12-invrequest-decode wire test #8404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Chand-ra
Copy link

@Chand-ra Chand-ra commented Jul 9, 2025

Currently, the BOLT #12 invrequest parsing test only tests the invrequest decode function. Add a test for the encoding function as well by making the test roundtrip.

Checklist

Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked:

  • The changelog has been updated in the relevant commit(s) according to the guidelines.
  • Tests have been added or modified to reflect the changes.
  • Documentation has been reviewed and updated as needed.
  • Related issues have been listed and linked, including any that this PR closes.

CC: @morehouse

@morehouse
Copy link
Contributor

Doesn't fuzz-bolt12-invrequest-decode.c already cover most of what is being tested here, plus more in invoice_decode?

@Chand-ra
Copy link
Author

Chand-ra commented Jul 11, 2025

Doesn't fuzz-bolt12-invrequest-decode.c already cover most of what is being tested here, plus more in invoice_decode?

Right, I guess it makes more sense then to replicate this test as an improvement to fuzz-bolt12-invrequest-decode instead of adding a new test here.

Chandra Pratap added 2 commits July 11, 2025 06:16
Changelog-None: Currently, the `BOLT ElementsProject#12` invrequest parsing test
only tests the invrequest decode function. Add a test for the
encoding function as well by making the test roundtrip.
Improvements in the fuzz-testing scheme of
`fuzz-bolt12-invrequest-decode` led to the discovery of test inputs
that result in greater in code coverage.

Add these inputs to the test's seed corpus.
@Chand-ra Chand-ra force-pushed the tlv_invoice_request branch from 1a8f7a6 to 48bf887 Compare July 14, 2025 04:50
@Chand-ra Chand-ra changed the title fuzz-tests: Add a wire test for struct tlv_invoice_request fuzz-tests: Improve the fuzz-bolt12-invrequest-decode wire test Jul 14, 2025
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