HomePhabricator

Add simple unit tests for parse_name()

Description

Add simple unit tests for parse_name()

Summary:
Adds some simple unit tests for the seeder's parse_name() function.

Currently, parse_name() has some logic flaws that prevent some test cases.

  • No check for the length of the query name (the maximum length is 255 characters total)
  • An assumption that the length of the output buffer is greater than 0.

Depends on D4417

Test Plan:

make check
ninja check

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix, Fabien, jasonbcox

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D4418

Details

Provenance
nakihitoAuthored on Feb 25 2020, 19:51
nakihitoPushed on Mar 2 2020, 23:12
Reviewer
Restricted Owners Package
Differential Revision
D4418: Add simple unit tests for parse_name()
Parents
rABCd357fa5a29b3: scripted-diff: replace chainActive -> ::ChainActive()
Branches
Unknown
Tags
Unknown