[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87cyqvf1ic.fsf@nvidia.com>
Date: Fri, 12 Apr 2024 10:02:57 +0200
From: Petr Machata <petrm@...dia.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: <davem@...emloft.net>, <netdev@...r.kernel.org>, <edumazet@...gle.com>,
<pabeni@...hat.com>, <shuah@...nel.org>, <petrm@...dia.com>,
<linux-kselftest@...r.kernel.org>
Subject: Re: [PATCH net-next 4/6] selftests: net: print full exception on
failure
Jakub Kicinski <kuba@...nel.org> writes:
> Instead of a summary line print the full exception.
> This makes debugging Python tests much easier.
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
Reviewed-by: Petr Machata <petrm@...dia.com>
> @@ -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'):
(The strip is necessary to get rid of trailing newlines.)
> ksft_pr("Exception|", line)
> ktap_result(False, cnt, case)
> totals['fail'] += 1
Powered by blists - more mailing lists