Skip to content

Commit c55755f

Browse files
TMHSDigitalclaude
andcommitted
Stop TestInconclusiveListOff refusing the wildcard probe
The lab server refused every name starting with "bad", and the wildcard probe's random label is hex, so about one probe in 4096 began with "bad", came back REFUSED and failed the scan as inconclusive (seen on macOS in PR #429's CI). Use "bad-" names, which a hex label cannot match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 2e9b6bc commit c55755f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎pkg/subenum/subenum_test.go‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,12 +504,14 @@ func TestMaxDuration(t *testing.T) {
504504
// internal/libhook with the list turned off, which keeps none (#367).
505505
func TestInconclusiveListOff(t *testing.T) {
506506
srv := dnstest.Start(t, func(q dnstest.Query) dnstest.Reply {
507-
if strings.HasPrefix(q.Name, "bad") {
507+
// "bad-", not "bad": the wildcard probe's random hex label can start
508+
// with "bad", and refusing it fails the scan.
509+
if strings.HasPrefix(q.Name, "bad-") {
508510
return dnstest.Refused
509511
}
510512
return dnstest.NXDomain
511513
})
512-
cfg := subenum.Config{Domain: "lab.example", Words: []string{"bad1", "ok", "bad2"}, Resolver: srv.Addr,
514+
cfg := subenum.Config{Domain: "lab.example", Words: []string{"bad-1", "ok", "bad-2"}, Resolver: srv.Addr,
513515
Timeout: 10 * time.Second, Attempts: 1}
514516
_, stats, err := subenum.Scan(context.Background(), cfg)
515517
if err != nil || len(stats.Inconclusive) != 2 {

0 commit comments

Comments
 (0)