Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/case/misc/support_collect/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
result = tgtssh.run("sudo support --work-dir /tmp collect --log-sec 2",
stdout=f,
stderr=subprocess.PIPE,
timeout=120)
timeout=300)

if result.returncode != 0:
stderr_output = result.stderr.decode('utf-8') if result.stderr else ""
Expand Down Expand Up @@ -120,7 +120,7 @@
result = tgtssh.run(f"sudo support --work-dir /tmp collect --log-sec 2 --password {test_password}",
stdout=f,
stderr=subprocess.PIPE,
timeout=120)
timeout=300)

if result.returncode != 0:
stderr_output = result.stderr.decode('utf-8') if result.stderr else ""
Expand Down
12 changes: 10 additions & 2 deletions test/infamy/ptp.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,19 @@ def is_own_gm(target, inst_idx=0):


def has_converged(target, threshold_ns=100_000, inst_idx=0):
"""True when |offset-from-time-transmitter| < threshold_ns."""
"""True when |offset-from-time-transmitter| < threshold_ns.

Prints the offset while unconverged, so a failed until() wait
shows the offset trend in the test log.
"""
off = offset_ns(target, inst_idx)
if off is None:
print(f"{target.name}: no offset-from-time-transmitter")
return False
return abs(off) < threshold_ns
if abs(off) < threshold_ns:
return True
print(f"{target.name}: offset {off} ns, threshold {threshold_ns} ns")
return False


def port_state_dbg(target, port_idx=1, inst_idx=0):
Expand Down