lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM0EoMnJq9GfapaueCkOWVUH81kTFRbuuwpweVo472X5tUHxsQ@mail.gmail.com>
Date: Fri, 16 Aug 2024 00:51:26 -0400
From: Jamal Hadi Salim <jhs@...atatu.com>
To: Simon Horman <horms@...nel.org>
Cc: Cong Wang <xiyou.wangcong@...il.com>, Jiri Pirko <jiri@...nulli.us>, 
	Shuah Khan <shuah@...nel.org>, "David S. Miller" <davem@...emloft.net>, 
	Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, 
	netdev@...r.kernel.org, linux-kselftest@...r.kernel.org, 
	Victor Nogueira <victor@...atatu.com>, Pedro Tammela <pctammela@...atatu.com>
Subject: Re: [PATCH net] tc-testing: don't access non-existent variable on exception

On Thu, Aug 15, 2024 at 11:37 AM Simon Horman <horms@...nel.org> wrote:
>
> Since commit 255c1c7279ab ("tc-testing: Allow test cases to be skipped")
> the variable test_ordinal doesn't exist in call_pre_case().
> So it should not be accessed when an exception occurs.
>

LGTM.
Acked-by: Jamal Hadi Salim <jhs@...atatu.com>

cheers,
jamal
> This resolves the following splat:
>
>   ...
>   During handling of the above exception, another exception occurred:
>
>   Traceback (most recent call last):
>     File ".../tdc.py", line 1028, in <module>
>       main()
>     File ".../tdc.py", line 1022, in main
>       set_operation_mode(pm, parser, args, remaining)
>     File ".../tdc.py", line 966, in set_operation_mode
>       catresults = test_runner_serial(pm, args, alltests)
>     File ".../tdc.py", line 642, in test_runner_serial
>       (index, tsr) = test_runner(pm, args, alltests)
>     File ".../tdc.py", line 536, in test_runner
>       res = run_one_test(pm, args, index, tidx)
>     File ".../tdc.py", line 419, in run_one_test
>       pm.call_pre_case(tidx)
>     File ".../tdc.py", line 146, in call_pre_case
>       print('test_ordinal is {}'.format(test_ordinal))
>   NameError: name 'test_ordinal' is not defined
>
> Fixes: 255c1c7279ab ("tc-testing: Allow test cases to be skipped")
> Signed-off-by: Simon Horman <horms@...nel.org>
> ---
>  tools/testing/selftests/tc-testing/tdc.py | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/tools/testing/selftests/tc-testing/tdc.py b/tools/testing/selftests/tc-testing/tdc.py
> index ee349187636f..4f255cec0c22 100755
> --- a/tools/testing/selftests/tc-testing/tdc.py
> +++ b/tools/testing/selftests/tc-testing/tdc.py
> @@ -143,7 +143,6 @@ class PluginMgr:
>              except Exception as ee:
>                  print('exception {} in call to pre_case for {} plugin'.
>                        format(ee, pgn_inst.__class__))
> -                print('test_ordinal is {}'.format(test_ordinal))
>                  print('testid is {}'.format(caseinfo['id']))
>                  raise
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ