Re: [PATCH net-next 4/6] selftests: net: print full exception on failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jakub Kicinski <kuba@xxxxxxxxxx> writes:

> Instead of a summary line print the full exception.
> This makes debugging Python tests much easier.
>
> Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>

Reviewed-by: Petr Machata <petrm@xxxxxxxxxx>

> @@ -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





[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux