linux_dsm_epyc7002/tools/testing/selftests
Brenda J. Butler 7dfbe5b64f tc-testing: very simple example test cases
As part of documentation, supply some very simple test cases
to illustrate how test cases work.  One test case shows
commands in the setup, command, verify and teardown stages.
Other test cases show how to have a working test case that
does not have commands in the setup, verify and/or teardown
stages.

Specifically, the command lists for setup and teardown can
be empty.  And the verify command must have a command, but
it can be /bin/true.  The regex must have a string, we
recommend a single space, and the count of matches must be
zero if you do not want to use the match feature of verify.
Verify will always look for a return code of success (0)
so we give /bin/true when we do not want to make a check
there.

Also, update the documentation for testcases to be more
specific in the cases of:

    - accepting non-success return codes in setup and
      teardown stages
    - how to write the test when no setup, teardown
      and/or verify are desired.

To run the example test cases:

    $ sudo -E ./tdc.py -f creating-testcases/example.json -l
    1f: (example) simple test to test framework
    2f: (example) simple test, no need for verify
    3f: (example) simple test, no need for setup or teardown (or verify)
    $ sudo -E ./tdc.py -f creating-testcases/example.json
    Test 1f: simple test to test framework
    Test 2f: simple test, no need for verify
    Test 3f: simple test, no need for setup or teardown (or verify)
    All test results:

    1..3
    ok 1 1f simple test to test framework
    ok 2 2f simple test, no need for verify
    ok 3 3f simple test, no need for setup or teardown (or verify)

    $

Signed-off-by: Brenda J. Butler <bjb@mojatatu.com>
Acked-by: Lucas Bates <lucasb@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01 11:04:46 +09:00
..
bpf selftests/bpf: fix broken build of test_maps 2017-10-23 01:06:31 +01:00
breakpoints selftests: breakpoints: re-order TEST_GEN_PROGS targets 2017-09-18 10:53:58 -06:00
capabilities selftests: capabilities: convert error output to TAP13 ksft framework 2017-08-14 11:31:15 -06:00
cpu-hotplug selftests/cpu-hotplug: Skip test when there is only one online cpu 2017-08-16 17:48:18 -06:00
cpufreq
drivers/gpu
efivarfs
exec
filesystems
firmware test_firmware: add batched firmware tests 2017-08-10 13:58:41 -07:00
ftrace selftests/ftrace: multiple_kprobes: Also check for support 2017-09-18 10:55:55 -06:00
futex selftests: futex: Makefile: fix for loops in targets to run silently 2017-09-25 10:09:00 -06:00
gpio
ia64
intel_pstate selftests/intel_pstate: No need to compile test progs in the run script 2017-09-18 10:54:53 -06:00
ipc
kcmp tools/testing/selftests/kcmp/kcmp_test.c: add KCMP_EPOLL_TFD testing 2017-09-08 18:26:47 -07:00
kmod test_kmod: fix description for -s -and -c parameters 2017-08-18 15:32:01 -07:00
lib
locking
media_tests
membarrier
memfd selftests/memfd: correct run_tests.sh permission 2017-09-25 10:09:06 -06:00
memory-hotplug
mount
mqueue selftests: mqueue: fix regression in silencing output from RUN_TESTS 2017-10-05 11:34:43 -06:00
net selftests: rtnetlink: add a small macsec test case 2017-10-12 23:05:55 -07:00
networking/timestamping selftests/net: rxtimestamp: Fix an off by one 2017-10-05 21:28:53 -07:00
nsfs
ntb ntb: ntb_test: ensure the link is up before trying to configure the mws 2017-08-01 15:18:59 -04:00
powerpc selftests/powerpc: Force ptrace tests to build -fno-pie 2017-08-31 14:26:49 +10:00
prctl
pstore selftests: pstore: add .gitignore for generated files 2017-08-02 13:50:29 -06:00
ptp selftests: ptp: include default header install path 2017-08-02 15:26:46 -06:00
ptrace
rcutorture Merge branches 'doc.2017.08.17a', 'fixes.2017.08.17a', 'hotplug.2017.07.25b', 'misc.2017.08.17a', 'spin_unlock_wait_no.2017.08.17a', 'srcu.2017.07.27c' and 'torture.2017.07.24c' into HEAD 2017-08-17 08:10:04 -07:00
seccomp linux-kselftest-4.14-rc3-fixes 2017-09-27 10:51:08 -07:00
sigaltstack tools: fix testing/selftests/sigaltstack for s390x 2017-09-18 10:52:01 -06:00
size
splice selftests: splice: add .gitignore for generated files 2017-08-02 13:50:48 -06:00
static_keys
sync selftests: sync: kselftest and kselftest-clean fail for make O=dir case 2017-09-21 07:55:40 -06:00
sysctl test_sysctl: fix sysctl.sh by making it executable 2017-08-07 15:13:36 -06:00
tc-testing tc-testing: very simple example test cases 2017-11-01 11:04:46 +09:00
timers selftests: timers: set-timer-lat: Fix hang when testing unsupported alarms 2017-09-25 10:09:07 -06:00
user
vDSO
vm userfaultfd: selftest: exercise -EEXIST only in background transfer 2017-10-13 16:18:32 -07:00
watchdog selftests: watchdog: fix to use TEST_GEN_PROGS and remove clean 2017-09-21 07:55:38 -06:00
x86 selftests: x86: sysret_ss_attrs doesn't build on a PIE build 2017-10-05 11:34:14 -06:00
zram
.gitignore
gen_kselftest_tar.sh
kselftest_harness.h selftests: Enhance kselftest_harness.h to print which assert failed 2017-09-05 19:21:33 -06:00
kselftest_install.sh
kselftest.h selftests: kselftest framework: change skip exit code to 0 2017-08-25 10:02:00 -06:00
lib.mk selftests: lib.mk: copy test scripts and test files for make O=dir run 2017-09-21 07:55:40 -06:00
Makefile selftests: Makefile: fix for loops in targets to run silently 2017-09-25 10:08:59 -06:00