pbhw: --one-wire never reached the suite's own sessions
The flag was plumbed through pbrig.Deployment to the host-tool subprocess calls and nowhere else, so identity() and scan() opened a raw port and drove a shared line as though it were two wires. On real one-wire hardware the adapter's echo answers the knock before the device does, so the suite would have died at its very first check — "the loader never answered; nothing below can be trusted" — for the one deployment the flag exists to test, and every result after it is gated on that check passing. Both now open through pbrig.Rig.open_port(), which applies the deployment's link mode. The gap underneath was that only the subprocess path could reach those facts at all; anything driving the protocol in-process had to restate them, and did not. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -53,7 +53,7 @@ class Suite:
|
||||
"""The info block, which every later check takes its bounds from."""
|
||||
module = pbrig.load_pureboot(self.rig.d.pureboot)
|
||||
self.rig.reset()
|
||||
port = module.Port(self.rig.d.port, self.rig.d.baud)
|
||||
port = self.rig.open_port() # wrapped for the echo where the line is shared
|
||||
try:
|
||||
loader = module.Loader(port)
|
||||
if self.rig.d.autobaud:
|
||||
@@ -87,7 +87,10 @@ class Suite:
|
||||
rate = module.scan_rate(self.rig.d.baud, pct)
|
||||
self.rig.reset()
|
||||
try:
|
||||
port = module.Port(self.rig.d.port, rate)
|
||||
# Same wrap as identity(): on a shared line an undiscarded
|
||||
# echo answers every rate a scan probes, so the walk would
|
||||
# report the first one it tried.
|
||||
port = self.rig.open_port(rate)
|
||||
except module.Error as error:
|
||||
self.check("scan opens every probe rate", False, f"{rate} Bd: {error}")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user