]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: pmtu: Introduce support for multiple tests
authorStefano Brivio <sbrivio@redhat.com>
Sat, 17 Mar 2018 01:31:41 +0000 (02:31 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 18 Mar 2018 00:15:14 +0000 (20:15 -0400)
commit8cf3a82a451f479e0079f287abd96a3435a7b9bc
treef0414f75f64542036adf16b33f215558503cad65
parent1865d9aeab8521682a4fa7423b185b16df6b65a3
selftests: pmtu: Introduce support for multiple tests

Introduce list of tests and their descriptions, and loop on it
in main body.

Tests will now just take care of calling setup with a list of
"units" they need, and return 0 on success, 1 on failure, 2 if
the test had to be skipped.

Main script body will take care of displaying results and
cleaning up after every test. Introduce guard variable so that
we don't clean up twice in case of interrupts or unexpected
failures.

The pmtu_vti6_exception test can now run its third step even if
the previous one failed, as we can return values from it.

Also introduce support to display test descriptions, and display
aligned OK/FAIL/SKIP test outcomes. Buffer error strings so that
in case of failure we can display them right under the outcome
for each test.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/pmtu.sh