Answer the review of hq issue 348's catalogue change
mesh/merge-gate pass: builds dnsmasq, docker, netcheck → ace, g14, novox, shanks; no bus step; 2 wait(s) for a person; every machine composes with the chan…
mesh/repo-check pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)
mesh/delivery superseded: a newer head of the same pull request

- The dnsmasq watch restarts only a unit that runs, without waiting for
  its start; a unit stopped, starting or failed is held and said (C2).
- dnsmasq_resolve asks only an address the resolver listens on (C3).
- Tests for the watch loop keeping its budget, a watch that wrote nothing
  or stopped looking, and a unit not running (C4).
- A restart is remembered as said only once emitted, restarts made before
  the bundle started are said, and whether one helped is said (C5).
- docker_events reads the runtime's whole buffer: complete when it is not
  full or reaches past the window, never a quiet machine read as lost (C6).
- netcheck: refused read with errors.Is; tests for addresses and ports,
  and for a container named as docker knows it.
This commit is contained in:
2026-10-09 15:25:45 +02:00
parent a0049f3e4e
commit a6a9a818d2
12 changed files with 437 additions and 120 deletions
+12
View File
@@ -115,6 +115,18 @@ func TestDNSSaysARefusedPortAndRefusesANameAsServer(t *testing.T) {
if a, _ := serverAddress("10.10.0.1"); a != "10.10.0.1:53" {
t.Fatalf("default port: %s", a)
}
for server, want := range map[string]string{"10.10.0.1:5353": "10.10.0.1:5353", " 127.0.0.1 ": "127.0.0.1:53",
"[::1]:53": "[::1]:53", "::1": "[::1]:53"} {
if a, err := serverAddress(server); err != nil || a != want {
t.Errorf("%q: %q, %v; want %q", server, a, err, want)
}
}
for _, server := range []string{"resolver.example:53", "resolver.example", "10.10.0.1:0", "10.10.0.1:65536",
"10.10.0.1:dns", ""} {
if a, err := serverAddress(server); err == nil {
t.Errorf("%q was taken as %q", server, a)
}
}
}
func TestListeningReadsTheKernelsTablesAndSaysWhatItCouldNotSee(t *testing.T) {
+2 -1
View File
@@ -9,6 +9,7 @@ import (
"sort"
"strconv"
"strings"
"syscall"
"time"
)
@@ -220,7 +221,7 @@ func timeoutOf(args map[string]any) (time.Duration, error) {
func dnsWords(err error, timeout time.Duration) string {
var ne net.Error
switch {
case strings.Contains(err.Error(), "connection refused"):
case errors.Is(err, syscall.ECONNREFUSED):
return "connection refused: nothing listens on that address and port"
case errors.As(err, &ne) && ne.Timeout():
return fmt.Sprintf("no answer within %s", timeout)