linux-stable/tools
Rae Moar 723c8258c8 kunit: tool: Add command line interface to filter and report attributes
Add ability to kunit.py to filter attributes and report a list of tests
including attributes without running tests.

Add flag "--filter" to input filters on test attributes. Tests will be
filtered out if they do not match all inputted filters.

Example: --filter speed=slow (This filter would run only the tests that are
marked as slow)

Filters have operations: <, >, <=, >=, !=, and =. But note that the
characters < and > are often interpreted by the shell, so they may need to
be quoted or escaped.

Example: --filter "speed>slow" or --filter speed\>slow (This filter would
run only the tests that have the speed faster than slow.

Additionally, multiple filters can be used.

Example: --filter "speed=slow, module!=example" (This filter would run
only the tests that have the speed slow and are not in the "example"
module)

Note if the user wants to skip filtered tests instead of not
running/showing them use the "--filter_action=skip" flag instead.

Expose the output of kunit.action=list option with flag "--list_tests" to
output a list of tests. Additionally, add flag "--list_tests_attr" to
output a list of tests and their attributes. These flags are useful to see
tests and test attributes without needing to run tests.

Example of the output of "--list_tests_attr":
  example
  example.test_1
  example.test_2
  # example.test_2.speed: slow

This output includes a suite, example, with two test cases, test_1 and
test_2. And in this instance test_2 has been marked as slow.

Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Rae Moar <rmoar@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2023-07-26 13:29:21 -06:00
..
accounting delayacct: track delays from IRQ/SOFTIRQ 2023-04-18 16:39:34 -07:00
arch asm-generic updates for 6.5 2023-07-06 10:06:04 -07:00
bootconfig
bpf tools/resolve_btfids: Fix setting HOSTCFLAGS 2023-06-05 15:44:47 -07:00
build
certs
cgroup
counter tools/counter: Makefile: Remove lingering 'include' directories on make clean 2023-05-09 19:17:17 -04:00
debugging
edid
firewire
firmware
gpio tools: gpio: fix debounce_period_us output of lsgpio 2023-05-11 10:56:24 +02:00
hv
iio
include asm-generic updates for 6.5 2023-07-06 10:06:04 -07:00
io_uring
kvm/kvm_stat
laptop
leds
lib perf tools changes and fixes for v6.5: 1st batch 2023-06-30 11:35:41 -07:00
memory-model LKMM scripting updates for v6.4 2023-04-24 12:02:25 -07:00
mm slab changes for 6.4 2023-04-25 13:00:41 -07:00
net/ynl tools: ynl: add display-hint support to ynl 2023-06-24 15:45:49 -07:00
objtool objtool: Remove btrfs_assertfail() from the noreturn exceptions list 2023-06-29 17:27:47 -07:00
pci
pcmcia
perf perf tools changes and fixes for v6.5: 2nd batch 2023-07-08 10:21:51 -07:00
power platform-drivers-x86 for v6.5-1 2023-06-30 14:50:00 -07:00
rcu
scripts sh updates for v6.4 2023-04-27 17:41:23 -07:00
spi spi: spidev_test Add three missing spi mode bits 2023-05-30 15:20:12 +01:00
testing kunit: tool: Add command line interface to filter and report attributes 2023-07-26 13:29:21 -06:00
thermal
time
tracing rtla/timerlat_hist: Add timerlat user-space support 2023-06-13 16:41:14 -04:00
usb usbip: Use _FORTIFY_SOURCE=2 instead of (implicitly) =1 2023-05-29 15:11:30 +01:00
verification rv: Fix addition on an uninitialized variable 'run' 2023-04-25 17:02:13 -04:00
virtio tools/virtio: fix build break for aarch64 2023-06-27 10:47:08 -04:00
wmi
workqueue workqueue: Track and monitor per-workqueue CPU time usage 2023-05-17 17:02:09 -10:00
Makefile tools/Makefile: do missed s/vm/mm/ 2023-04-18 14:22:12 -07:00