diff options
author | Matthew Crymble <matthew.crymble@ni.com> | 2022-05-11 15:04:27 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-06-10 13:24:04 -0500 |
commit | 64e3139cb299cf5e7a59d5ab18a173b24b06ff3a (patch) | |
tree | 6d73e19777ca9781139983f0e0a7eae39b2ae5d7 | |
parent | 09262abca690ef14477f6b5925852a906fb19d5e (diff) | |
download | uhd-64e3139cb299cf5e7a59d5ab18a173b24b06ff3a.tar.gz uhd-64e3139cb299cf5e7a59d5ab18a173b24b06ff3a.tar.bz2 uhd-64e3139cb299cf5e7a59d5ab18a173b24b06ff3a.zip |
tests: streaming: mark non-dpdk failures as xfails
-rw-r--r-- | host/tests/pytests/test_streaming.py | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/host/tests/pytests/test_streaming.py b/host/tests/pytests/test_streaming.py index 3f6affa55..f0bb6f1d2 100644 --- a/host/tests/pytests/test_streaming.py +++ b/host/tests/pytests/test_streaming.py @@ -289,10 +289,6 @@ def test_streaming(pytestconfig, dut_type, use_dpdk, dual_SFP, rate, rx_rate, rx f"""Number of dropped samples exceeded threshold. Expected dropped samples: <= {dropped_samps_threshold} Actual dropped samples: {stats.avg_vals.dropped_samps}""" - assert stats.avg_vals.overruns <= overruns_threshold, \ - f"""Number of overruns exceeded threshold. - Expected overruns: <= {overruns_threshold} - Actual overruns: {stats.avg_vals.overruns}""" assert stats.avg_vals.rx_timeouts <= rx_timeouts_threshold, \ f"""Number of rx timeouts exceeded threshold. Expected rx timeouts: <= {rx_timeouts_threshold} @@ -301,12 +297,18 @@ def test_streaming(pytestconfig, dut_type, use_dpdk, dual_SFP, rate, rx_rate, rx f"""Number of rx sequence errors exceeded threshold. Expected rx sequence errors: <= {rx_seq_err_threshold} Actual rx sequence errors: {stats.avg_vals.rx_seq_errs}""" + if not stats.avg_vals.overruns <= overruns_threshold: + overrun_error_text = ( + f"Number of overruns exceeded threshold.\n" + f"Expected overruns: <= {overruns_threshold}\n" + f"Actual overruns: {stats.avg_vals.overruns}\n" + ) + if not use_dpdk: + pytest.xfail(overrun_error_text) + else: + pytest.fail(overrun_error_text) if tx_channels: - assert stats.avg_vals.underruns <= underruns_threshold, \ - f"""Number of underruns exceeded threshold. - Expected underruns: <= {underruns_threshold} - Actual underruns: {stats.avg_vals.underruns}""" assert stats.avg_vals.tx_timeouts <= tx_timeouts_threshold, \ f"""Number of tx timeouts exceeded threshold. Expected tx timeouts: <= {tx_timeouts_threshold} @@ -315,6 +317,16 @@ def test_streaming(pytestconfig, dut_type, use_dpdk, dual_SFP, rate, rx_rate, rx f"""Number of tx sequence errors exceeded threshold. Expected tx sequence errors: <= {tx_seq_err_threshold} Actual tx sequence errors: {stats.avg_vals.tx_seq_errs}""" + if not stats.avg_vals.underruns <= underruns_threshold: + underrun_error_text = ( + f"Number of underruns exceeded threshold.\n" + f"Expected underruns: <= {underruns_threshold}\n" + f"Actual underruns: {stats.avg_vals.underruns}\n" + ) + if not use_dpdk: + pytest.xfail(underrun_error_text) + else: + pytest.fail(underrun_error_text) assert stats.avg_vals.late_cmds <= late_cmds_threshold, \ f"""Number of late commands exceeded threshold. |