test(e2e): live link-local matrix on the kernel datapath

Two Alpine containers on a kernel link, a static raw-Ethernet probe built
at run time and docker-cp'd in (the image has no raw-frame tool; DockerDaemon
gains the cp), injecting per-destination-MAC frames from guest 1 while
guest 2 counts arrivals: ordinary multicast, STP, LACP, 802.1X and LLDP must
cross, PAUSE must not (the documented kernel limit). Asserts the anchors'
sysfs brport group_fwd_mask reads 0xfffd through the server's own wiring
(int-parsed: newer kernels print it hex), that the bridge level stays 0, and
that a container stop/start replays the mask with LACP surviving. Negative
control is the uBridge suite's setportgroupfwd 0 case.
This commit is contained in:
YueGuobin committed 2026-10-06 00:21:10 +08:00
1 parent f03c94db6d
commit df79773bc0
2 files changed
+385

No files matched your search

+19
View File
@@ -890,6 +890,25 @@ class DockerDaemon:
except (AssertionError, ValueError):
return "unknown"
def cp(self, container_id, tar_bytes, path):
"""Upload a tar archive into the container at *path* (``docker cp``
in); the daemon extracts it, honoring the entries' modes."""
conn = _UnixHTTPConnection(self.socket_path, self.timeout)
try:
conn.request(
"PUT",
f"/containers/{container_id}/archive?path={urllib.parse.quote(path)}",
body=tar_bytes,
headers={"Content-Type": "application/x-tar"},
)
response = conn.getresponse()
payload = response.read()
assert response.status == 200, f"docker cp into {container_id[:12]} -> HTTP {response.status}: {payload[:300]!r}"
except (OSError, http.client.HTTPException) as e:
raise AssertionError(f"docker cp into {container_id[:12]} failed: {e}") from None
finally:
conn.close()
def ensure_docker_image(server):
"""The Docker image the scenarios run, ensured present locally.