Message ID | 20240412141436.828666-5-kuba@kernel.org |
---|---|
State | Accepted |
Commit | 99583b970b9073ea258235e6c794fd515df19c61 |
Headers | show |
Series | selftests: net: exercise page pool reporting via netlink | expand |
diff --git a/tools/testing/selftests/net/lib/py/ksft.py b/tools/testing/selftests/net/lib/py/ksft.py index b4b0bfff68b0..793e4761645e 100644 --- a/tools/testing/selftests/net/lib/py/ksft.py +++ b/tools/testing/selftests/net/lib/py/ksft.py @@ -2,6 +2,7 @@ import builtins import inspect +import traceback from .consts import KSFT_MAIN_NAME KSFT_RESULT = None @@ -85,7 +86,8 @@ KSFT_RESULT = None totals['xfail'] += 1 continue except Exception as e: - for line in str(e).split('\n'): + tb = traceback.format_exc() + for line in tb.strip().split('\n'): ksft_pr("Exception|", line) ktap_result(False, cnt, case) totals['fail'] += 1