• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dnsimple / dns_erlang / 30160754950
92%

Build:
DEFAULT BRANCH: main
Ran 25 Jul 2026 01:59PM UTC
Jobs 1
Files 12
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Jul 2026 01:57PM UTC coverage: 91.225% (+0.2%) from 90.988%
30160754950

push

github

NelsonVides
Add wire-format properties for RDATA, and fix what they found

Nothing checked that RDATA survives a trip through the wire codec:
prop_wire_roundtrip in dns_domain_SUITE covers only domain names, and the
properties in dns_zone_prop cover the presentation format. Every wire bug
in this branch was found by an ad-hoc fuzz instead, so make it permanent.

Four properties over rdata bytes: the wire form is reproduced exactly,
re-encoding preserves the decoded value, normalising converges in one pass,
and encode_rrdata/2 never raises. Differences the RFCs mandate are
whitelisted individually, each with its citation, and deliberately narrowly
-- a blanket "any difference preserving the decoded value" would have waved
through the URI targets decoding used to rewrite.

Two things about the generator are worth keeping in mind. Random bytes are
nearly useless: measured over 10k draws they reach a structured decoder's
pattern for TXT 0.4% of the time, HINFO 0.06%, SOA never, so a property fed
only random bytes passes while testing nothing. Most rdata is therefore
built by encoding a generated record, or by mutating that. But seeding from
the encoder cannot catch the encoder dropping information, since the seed
is already missing it -- the empty <character-string> is exactly that case
-- so handbuilt_rdata/0 spells such rdata out on the wire directly.

Verified by reintroducing each historical bug: dropped TXT
character-strings, the DSA field width taken from P alone, KX bypassing
encode_dname/3, and a duplicate bitmap window are all caught, while a clean
tree stays quiet. One class is beyond reach and documented in the module: an
error made symmetrically in both directions, as LOC's reference point was,
round-trips perfectly and needs a known-answer vector instead.

Three bugs it found straight away:

  - encode_rrdata/2 crashed with badmap on every KX record. That clause
    called dns_domain:to_wire/3 directly rather than encode_dname/3, the
    only wrapper tha... (continued)

4 of 0 new or added lines in 0 files covered. (NaN%)

5 existing lines in 2 files now uncovered.

2942 of 3225 relevant lines covered (91.22%)

11777.91 hits per line

Coverage Regressions

Lines Coverage ∆ File
4
88.06
0.94% src/dns_encode.erl
1
96.59
1.38% src/dns_decode.erl
Jobs
ID Job ID Ran Files Coverage
1 30160754950.1 25 Jul 2026 01:59PM UTC 12
91.22
GitHub Action Run
Source Files on build 30160754950
  • Tree
  • List 12
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30160754950
  • 831208fe on github
  • Prev Build on main (#30157417737)
  • Next Build on main (#30161651760)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc