Tests: use CPU ids from online ranges
authorKienan Stewart <kstewart@efficios.com>
Mon, 19 Jun 2023 19:32:54 +0000 (15:32 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 11 Aug 2023 21:07:51 +0000 (17:07 -0400)
commitd2456f81866aea50e79ce64ecd5c889d054717b7
tree517bc26e73e2ce93f6e479edc184640306fbbabf
parentd0eca33e3e66b6d76fa4b64cfe49295bdb5b9c17
Tests: use CPU ids from online ranges

test_tracefile_count could fail randomly on systems where there are CPUs
present but not online. For example:

  $ cat /sys/devices/system/cpu/online
  0-7
  $ cat /sys/devices/system/cpu/present
  0-39

When a CPU is present, it will have an entry in
/sys/devices/system/cpu/cpuX for it's ID, and thus the test may pick
that CPU's ID. However, a present CPU which is not online is not a valid
target for taskset.

In cases where `get_any_available_cpu` is used with task set, the tests
could fail for a similar reason. This case can be somewhat less common,
because it would return the numerically lowest CPU first; however, with
online as follows cpu 0 isn't available and taskset fails.

  $ cat /sys/devices/system/cpu/online
  18-19,135,142
  $ cat /sys/devices/system/cpu/present
  0-167

Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ia7fb7ff69ecdd7aa6bac9dcfdf72344df08f6782
tests/regression/tools/snapshots/ust_test
tests/regression/tools/tracefile-limits/test_tracefile_count
tests/utils/utils.sh
This page took 0.025097 seconds and 4 git commands to generate.