mirror_ubuntu-kernels/tools/testing/selftests/net/lib/py
Jakub Kicinski 46619175f1 selftests: net: ksft: print more of the stack for checks
Print more stack frames and the failing line when check fails.
This helps when tests use helpers to do the checks.

Before:

  # At ./ksft/drivers/net/hw/rss_ctx.py line 92:
  # Check failed 1037698 >= 396893.0 traffic on other queues:[344612, 462380, 233020, 449174, 342298]
  not ok 8 rss_ctx.test_rss_context_queue_reconfigure

After:

  # Check| At ./ksft/drivers/net/hw/rss_ctx.py, line 387, in test_rss_context_queue_reconfigure:
  # Check|     test_rss_queue_reconfigure(cfg, main_ctx=False)
  # Check| At ./ksft/drivers/net/hw/rss_ctx.py, line 230, in test_rss_queue_reconfigure:
  # Check|     _send_traffic_check(cfg, port, ctx_ref, { 'target': (0, 3),
  # Check| At ./ksft/drivers/net/hw/rss_ctx.py, line 92, in _send_traffic_check:
  # Check|     ksft_lt(sum(cnts[i] for i in params['noise']), directed / 2,
  # Check failed 1045235 >= 405823.5 traffic on other queues (context 1)':[460068, 351995, 565970, 351579, 127270]
  not ok 8 rss_ctx.test_rss_context_queue_reconfigure

Link: https://patch.msgid.link/20240801232317.545577-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-08-02 16:09:47 -07:00
..
__init__.py selftests: drv-net: construct environment for running tests which require an endpoint 2024-04-23 10:13:56 -07:00
consts.py selftests: net: add scaffolding for Netlink tests in Python 2024-04-08 11:40:41 +01:00
ksft.py selftests: net: ksft: print more of the stack for checks 2024-08-02 16:09:47 -07:00
netns.py selftests: drv-net: construct environment for running tests which require an endpoint 2024-04-23 10:13:56 -07:00
nsim.py net: selftest: add test for netdev netlink queue-get API 2024-05-08 18:59:47 -07:00
utils.py selftests: drv-net: add ability to schedule cleanup with defer() 2024-06-28 18:39:39 -07:00
ynl.py selftests: net: add scaffolding for Netlink tests in Python 2024-04-08 11:40:41 +01:00