Patch "tc-testing: don't access non-existent variable on exception" has been added to the 5.10-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    tc-testing: don't access non-existent variable on exception

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tc-testing-don-t-access-non-existent-variable-on-exc.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 01043dff9cc681f2be4043dc3af1eaa9b0c070aa
Author: Simon Horman <horms@xxxxxxxxxx>
Date:   Thu Aug 15 16:37:13 2024 +0100

    tc-testing: don't access non-existent variable on exception
    
    [ Upstream commit a0c9fe5eecc97680323ee83780ea3eaf440ba1b7 ]
    
    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.
    
    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@xxxxxxxxxx>
    Acked-by: Jamal Hadi Salim <jhs@xxxxxxxxxxxx>
    Link: https://patch.msgid.link/20240815-tdc-test-ordinal-v1-1-0255c122a427@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/tc-testing/tdc.py b/tools/testing/selftests/tc-testing/tdc.py
index a3e43189d9400..d6a9d97f73c24 100755
--- a/tools/testing/selftests/tc-testing/tdc.py
+++ b/tools/testing/selftests/tc-testing/tdc.py
@@ -129,7 +129,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
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux