android_kernel_motorola_sm6375/tools/testing
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Steven Rostedt 061d24625d ktest.pl: Prevent recursion of default variable options
[ Upstream commit 61f7e318e99d3b398670518dd3f4f8510d1800fc ]

If a default variable contains itself, do not recurse on it.

For example:

  ADD_CONFIG := ${CONFIG_DIR}/temp_config
  DEFAULTS
  ADD_CONFIG = ${CONFIG_DIR}/default_config ${ADD_CONFIG}

The above works because the temp variable ADD_CONFIG (is a temp because it
is created with ":=") is already defined, it will be substituted in the
variable option. But if it gets commented out:

  # ADD_CONFIG := ${CONFIG_DIR}/temp_config
  DEFAULTS
  ADD_CONFIG = ${CONFIG_DIR}/default_config ${ADD_CONFIG}

Then the above will go into a recursive loop where ${ADD_CONFIG} will
get replaced with the current definition of ADD_CONFIG which contains the
${ADD_CONFIG} and that will also try to get converted. ktest.pl will error
after 100 attempts of recursion and fail.

When replacing a variable with the default variable, if the default
variable contains itself, do not replace it.

Cc: "John Warthog9 Hawley" <[email protected]>
Cc: Dhaval Giani <[email protected]>
Cc: Greg KH <[email protected]>
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Steven Rostedt <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2025-08-28 16:21:26 +02:00
..
fault-injection
ktest ktest.pl: Prevent recursion of default variable options 2025-08-28 16:21:26 +02:00
nvdimm
radix-tree radix tree test suite: fix incorrect allocation size for pthreads 2023-08-16 18:19:23 +02:00
scatterlist
selftests selftests: tracing: Use mutex_unlock for testing glob filter 2025-08-28 16:21:25 +02:00
vsock