aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/vsock/vsock_diag_test.c
diff options
context:
space:
mode:
authorStefano Garzarella <sgarzare@redhat.com>2019-12-18 19:07:06 +0100
committerDavid S. Miller <davem@davemloft.net>2019-12-20 21:09:21 -0800
commit5a2b2425634dd8d340d3889f2317a752a1a87618 (patch)
tree3378d547e04b073903a9283e317347f6d46ce0f2 /tools/testing/vsock/vsock_diag_test.c
parentvsock_test: wait for the remote to close the connection (diff)
downloadlinux-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 'tools/testing/vsock/vsock_diag_test.c')
-rw-r--r--tools/testing/vsock/vsock_diag_test.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/tools/testing/vsock/vsock_diag_test.c b/tools/testing/vsock/vsock_diag_test.c
index abd7dc2a9631..b82483627259 100644
--- a/tools/testing/vsock/vsock_diag_test.c
+++ b/tools/testing/vsock/vsock_diag_test.c
@@ -464,6 +464,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 = '?',
@@ -473,7 +483,7 @@ static const struct option longopts[] = {
static void usage(void)
{
- fprintf(stderr, "Usage: vsock_diag_test [--help] [--control-host=<host>] --control-port=<port> --mode=client|server --peer-cid=<cid>\n"
+ fprintf(stderr, "Usage: vsock_diag_test [--help] [--control-host=<host>] --control-port=<port> --mode=client|server --peer-cid=<cid> [--list] [--skip=<test_id>]\n"
"\n"
" Server: vsock_diag_test --control-port=1234 --mode=server --peer-cid=3\n"
" Client: vsock_diag_test --control-host=192.168.0.1 --control-port=1234 --mode=client --peer-cid=2\n"
@@ -528,6 +538,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();