kernel_samsung_a53x/tools/testing/selftests
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
..
android
arm64 kselftest/arm64: Don't leak pipe fds in pac.exec_sign_all() 2024-12-17 13:24:29 +01:00
bpf selftests/bpf: Add push/pop checking for msg_verify_data in test_sockmap 2024-12-17 13:24:06 +01:00
breakpoints Revert "selftests: breakpoints: use remaining time to check if suspend succeed" 2024-11-24 00:23:05 +01:00
capabilities
cgroup
clone3
core
cpu-hotplug
cpufreq
damon
dmabuf-heaps kselftests: dmabuf-heaps: Ensure the driver name is null-terminated 2025-01-19 00:10:00 +01:00
drivers selftests: mlxsw: sharedbuffer: Remove duplicate test cases 2025-01-02 17:00:50 +01:00
efivarfs
exec
filesystems BACKPORT: FROMGIT: binder: frozen notification binder_features flag 2025-01-19 14:57:12 +01:00
firmware
fpu
ftrace
futex
gpio
ia64
intel_pstate
ipc
ir
kcmp
kexec
kmod
kselftest
kvm
lib
livepatch
lkdtm
locking
media_tests
membarrier
memfd
memory-hotplug
mincore
mount
mqueue
net selftests: net: really check for bg process completion 2024-12-17 13:24:07 +01:00
netfilter
nsfs
ntb
openat2
pid_namespace
pidfd
powerpc
prctl
proc
pstore
ptp
ptrace
rcutorture
resctrl selftests/resctrl: Protect against array overrun during iMC config parsing 2024-12-17 13:24:03 +01:00
rseq
rtc
safesetid
seccomp
sigaltstack
size
sparc64
splice
static_keys
sync
sysctl
tc-testing tc-testing: don't access non-existent variable on exception 2025-01-19 15:03:00 +01:00
timens
timers
tmpfs
tpm2
uevent
user
vDSO
vm
watchdog selftests/watchdog-test: Fix system accidentally reset after watchdog-test 2024-12-17 13:23:57 +01:00
wireguard wireguard: selftests: load nf_conntrack if not present 2024-12-17 13:24:07 +01:00
x86
zram
gen_kselftest_tar.sh
kselftest.h
kselftest_deps.sh
kselftest_harness.h
kselftest_install.sh
kselftest_module.h
lib.mk
Makefile
run_kselftest.sh