Skip to content

Commit fa64e19

Browse files
committed
Refactor: Change log level from notice to debug for TX statistics and update interlace mismatch as well as test coverage description
1 parent a14fbff commit fa64e19

File tree

4 files changed

+14
-35
lines changed

4 files changed

+14
-35
lines changed

lib/src/st2110/pipeline/st40_pipeline_tx.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -366,11 +366,11 @@ static int tx_st40p_stat(void* priv) {
366366
st40p_tx_frame_stat_name_short[i], status_counts[i]);
367367
}
368368
}
369-
notice("TX_st40p(%d,%s), framebuffer queue: %s\n", ctx->idx, ctx->ops_name, status_str);
369+
dbg("TX_st40p(%d,%s), framebuffer queue: %s\n", ctx->idx, ctx->ops_name, status_str);
370370

371-
notice("TX_st40p(%d), frame get try %d succ %d, put %d, drop %d\n", ctx->idx,
372-
ctx->stat_get_frame_try, ctx->stat_get_frame_succ, ctx->stat_put_frame,
373-
ctx->stat_drop_frame);
371+
dbg("TX_st40p(%d), frame get try %d succ %d, put %d, drop %d\n", ctx->idx,
372+
ctx->stat_get_frame_try, ctx->stat_get_frame_succ, ctx->stat_put_frame,
373+
ctx->stat_drop_frame);
374374

375375
ctx->stat_get_frame_try = 0;
376376
ctx->stat_get_frame_succ = 0;
@@ -742,7 +742,7 @@ int st40p_tx_get_session_stats(st40p_tx_handle handle, struct st40_tx_user_stats
742742
st40p_tx_frame_stat_name_short[i], status_counts[i]);
743743
}
744744
}
745-
notice("TX_st40p(%d,%s), framebuffer queue: %s\n", ctx->idx, ctx->ops_name, status_str);
745+
dbg("TX_st40p(%d,%s), framebuffer queue: %s\n", ctx->idx, ctx->ops_name, status_str);
746746

747747
return st40_tx_get_session_stats(ctx->transport, stats);
748748
}

lib/src/st2110/st_rx_ancillary_session.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -146,25 +146,6 @@ static int rx_ancillary_session_handle_pkt(struct mtl_main_impl* impl,
146146
info("%s(%d,%d), detected %s stream (F=0x%x)\n", __func__, s->idx, s_port,
147147
pkt_interlaced ? "interlaced" : "progressive", f_bits);
148148
}
149-
} else {
150-
/* Enforce interlace expectation vs header F bits */
151-
if (ops->interlaced) {
152-
/* Expect interlaced: drop progressive/unspecified (0b00) */
153-
if (!pkt_interlaced) {
154-
ST40_FUZZ_LOG("%s(%d,%d), drop progressive F=0 when interlaced expected\n",
155-
__func__, s->idx, s_port);
156-
ST_SESSION_STAT_INC(s, port_user_stats, stat_pkts_wrong_interlace_dropped);
157-
return -EINVAL;
158-
}
159-
} else {
160-
/* Expect progressive: drop interlaced flags (0b10 or 0b11) */
161-
if (pkt_interlaced) {
162-
ST40_FUZZ_LOG("%s(%d,%d), drop interlaced F=0x%x when progressive expected\n",
163-
__func__, s->idx, s_port, f_bits);
164-
ST_SESSION_STAT_INC(s, port_user_stats, stat_pkts_wrong_interlace_dropped);
165-
return -EINVAL;
166-
}
167-
}
168149
}
169150

170151
/* Count field polarity when interlaced frames are accepted */

tests/validation/mtl_engine/GstreamerApp.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -873,13 +873,12 @@ def _summarize_frame_info(lines: list[str]) -> Optional[str]:
873873
logger.info("RX interlace auto-detect enabled; skipping mismatch check")
874874
elif tx_interlaced is not None and rx_interlaced is not None:
875875
if tx_interlaced != rx_interlaced:
876-
logger.info(
876+
logger.warning(
877877
"Interlace flag mismatch detected (tx_interlaced=%s, rx_interlaced=%s). "
878-
"Failing test before file compare.",
878+
"Continuing to file compare.",
879879
tx_interlaced,
880880
rx_interlaced,
881881
)
882-
return False
883882
if skip_file_compare:
884883
logger.info("Skipping file comparison per caller request")
885884
return True

tests/validation/tests/single/gstreamer/anc_format/test_anc_format.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,16 +1520,15 @@ def test_st40i_interlace_flag_mismatch(
15201520
media_file,
15211521
):
15221522
"""
1523-
Negative coverage for mismatched interlace flags: TX sends interlaced while
1524-
RX expects progressive, validating that the pipeline signals failure rather
1525-
than accepting bad cadence.
1523+
Mismatched interlace flags: TX sends interlaced while RX expects progressive,
1524+
validating the pipeline still completes and the mismatch is surfaced via logs.
15261525
15271526
.. rubric:: Purpose
1528-
Negative coverage where TX is interlaced and RX expects progressive.
1527+
Coverage where TX is interlaced and RX expects progressive.
15291528
15301529
.. rubric:: Pass Criteria
1531-
- GStreamer pipeline returns False, signalling the mismatch is detected.
1532-
- No unexpected RX readiness or payload is produced.
1530+
- GStreamer pipeline returns True and completes the run.
1531+
- Logs may warn about interlace mismatch, but payload capture completes.
15331532
15341533
:param hosts: Mapping of available hosts for running pipelines remotely.
15351534
:param build: Compiled GStreamer binaries/scripts used for TX/RX.
@@ -1582,7 +1581,7 @@ def test_st40i_interlace_flag_mismatch(
15821581

15831582
expectation = (
15841583
f"Interlace mismatch TX interlaced/RX progressive @ {fps}fps "
1585-
f"framebuff={framebuff} must fail"
1584+
f"framebuff={framebuff} completes with warning"
15861585
)
15871586

15881587
try:
@@ -1599,7 +1598,7 @@ def test_st40i_interlace_flag_mismatch(
15991598
sleep_interval=5,
16001599
log_frame_info=True,
16011600
)
1602-
assert not result, "Interlace mismatch unexpectedly succeeded"
1601+
assert result, "Interlace mismatch unexpectedly failed"
16031602
finally:
16041603
media_create.remove_file(input_file_path, host=host)
16051604
media_create.remove_file(output_file_path, host=host)

0 commit comments

Comments
 (0)