linux-stable/tools
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
..
accounting
arch tools include: Sync kernel ABI headers with tooling headers 2017-09-25 10:39:44 -03:00
bpf tools: bpftool: add bash completion for bpftool 2017-10-29 18:37:33 +09:00
build tools build tests: Don't hardcode gcc name 2017-08-28 16:44:44 -03:00
cgroup
firewire
gpio
hv Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-09-06 14:45:08 -07:00
iio
include Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-10-30 21:09:24 +09:00
kvm/kvm_stat
laptop
leds
lib libbpf: use map_flags when creating maps 2017-10-05 21:42:28 -07:00
nfsd
objtool objtool: Fix memory leak in decode_instructions() 2017-10-20 09:43:21 +02:00
pci tools: PCI: Add a missing option help line 2017-08-29 16:03:34 -05:00
pcmcia
perf perf test shell trace+probe_libc_inet_pton.sh: Be compatible with Debian/Ubuntu 2017-10-18 09:14:18 -03:00
power Kbuild fixes for v4.14 (2nd) 2017-10-28 11:01:57 -07:00
scripts kbuild: revert $(realpath ...) to $(shell cd ... && /bin/pwd) 2017-10-07 20:08:02 +09:00
spi
testing tc-testing: very simple example test cases 2017-11-01 11:04:46 +09:00
thermal/tmon
time
usb usbip: auto retry for concurrent attach 2017-08-31 18:08:45 +02:00
virtio
vm
Makefile tools: rename tools/net directory to tools/bpf 2017-10-04 21:45:05 -07:00