diff --git a/src/Script_ABC_Blanton/Blanton_Script/blanton_traffic_linespeed.sh b/src/Script_ABC_Blanton/Blanton_Script/blanton_traffic_linespeed.sh index 5c19c2d..ed0c4e7 100644 --- a/src/Script_ABC_Blanton/Blanton_Script/blanton_traffic_linespeed.sh +++ b/src/Script_ABC_Blanton/Blanton_Script/blanton_traffic_linespeed.sh @@ -61,6 +61,19 @@ # intentional difference from # tools/bcm_mibpair_report_V1.1.0.py, which hides NA pairs # unless -a is given. +# V0.4.1 2026-08-19 Fix: report printed every counter as 2147483647 (INT32_MAX). +# grp() rendered values with sprintf("%d", v); the DUT's awk +# casts to a 32-bit int for %d, so any counter above 2^31-1 +# -- i.e. every real line-speed run -- saturated. Values are +# now formatted with %.0f, which stays in awk's double domain +# (exact to 2^53, far above any MIB counter). +# NOTE: the PASS/FAIL verdicts were NEVER affected -- the +# cross-check compares TX[]/RX[] doubles directly and only +# the display path went through grp(). Past reports that said +# PASS were right; only the numbers shown were wrong. +# Same fix applied to the "# FAIL ..." delta line (%+d -> +# %+.0f), which would otherwise saturate when a dead port +# makes the delta the size of the whole counter. # ============================================================================= # # The VLAN/port table below is copied verbatim from @@ -486,7 +499,7 @@ _tl_pair_report() { -v TSV="$TL_REPORT_TSV" \ -v COLOR="$color" ' function grp(v, s,out,l,i) { - s = sprintf("%d", v) + s = sprintf("%.0f", v) if (!GROUPED) return s out = ""; l = length(s) for (i = 1; i <= l; i++) { @@ -557,7 +570,7 @@ _tl_pair_report() { if (d <= TOL + 0) { v = "PASS"; npass++ } else { v = "FAIL"; nfail++ - FL[++nf] = sprintf("# FAIL %s/%s: %s.TX-%s.RX=%+d %s.RX-%s.TX=%+d", \ + FL[++nf] = sprintf("# FAIL %s/%s: %s.TX-%s.RX=%+.0f %s.RX-%s.TX=%+.0f", \ a, b, a, b, dtx, a, b, drx) } ta = grp(TX[a]); ra = grp(RX[a]); tb = grp(TX[b]); rb = grp(RX[b])