kernel_samsung_a53x/tools
Simon Horman 8aa7068ac7 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@kernel.org>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Link: https://patch.msgid.link/20240815-tdc-test-ordinal-v1-1-0255c122a427@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-01-19 15:03:00 +01:00
..
accounting
arch
bootconfig
bpf
build
cgroup
crypto
debugging
edid
firewire
firmware
gpio
hv
iio
include
io_uring
kvm/kvm_stat
laptop
leds
lib libbpf: Add NULL checks to bpf_object__{prev_map,next_map} 2025-01-19 00:10:00 +01:00
memory-model
objtool objtool/x86: allow syscall instruction 2025-01-02 17:01:18 +01:00
pci
pcmcia
perf perf trace: Avoid garbage when not printing a syscall's arguments 2024-12-17 13:24:12 +01:00
power
scripts
spi
testing tc-testing: don't access non-existent variable on exception 2025-01-19 15:03:00 +01:00
thermal/tmon
time
usb
virtio
vm
wmi
Makefile