diff options
author | Stefano Garzarella <sgarzare@redhat.com> | 2019-12-18 19:07:06 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-12-20 21:09:21 -0800 |
commit | 5a2b2425634dd8d340d3889f2317a752a1a87618 (patch) | |
tree | 3378d547e04b073903a9283e317347f6d46ce0f2 /tools/testing/vsock/vsock_test.c | |
parent | vsock_test: wait for the remote to close the connection (diff) | |
download | linux-dev-5a2b2425634dd8d340d3889f2317a752a1a87618.tar.xz linux-dev-5a2b2425634dd8d340d3889f2317a752a1a87618.zip |
testing/vsock: add parameters to list and skip tests
Some tests can fail with transports that have a slightly
different behavior, so let's add the possibility to specify
which tests to skip.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | tools/testing/vsock/vsock_test.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c index 629d7ce58202..3ac56651f3f9 100644 --- a/tools/testing/vsock/vsock_test.c +++ b/tools/testing/vsock/vsock_test.c @@ -13,6 +13,7 @@ #include <string.h> #include <errno.h> #include <unistd.h> +#include <linux/kernel.h> #include "timeout.h" #include "control.h" @@ -223,6 +224,16 @@ static const struct option longopts[] = { .val = 'p', }, { + .name = "list", + .has_arg = no_argument, + .val = 'l', + }, + { + .name = "skip", + .has_arg = required_argument, + .val = 's', + }, + { .name = "help", .has_arg = no_argument, .val = '?', @@ -232,7 +243,7 @@ static const struct option longopts[] = { static void usage(void) { - fprintf(stderr, "Usage: vsock_test [--help] [--control-host=<host>] --control-port=<port> --mode=client|server --peer-cid=<cid>\n" + fprintf(stderr, "Usage: vsock_test [--help] [--control-host=<host>] --control-port=<port> --mode=client|server --peer-cid=<cid> [--list] [--skip=<test_id>]\n" "\n" " Server: vsock_test --control-port=1234 --mode=server --peer-cid=3\n" " Client: vsock_test --control-host=192.168.0.1 --control-port=1234 --mode=client --peer-cid=2\n" @@ -287,6 +298,13 @@ int main(int argc, char **argv) case 'P': control_port = optarg; break; + case 'l': + list_tests(test_cases); + break; + case 's': + skip_test(test_cases, ARRAY_SIZE(test_cases) - 1, + optarg); + break; case '?': default: usage(); |