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>
This commit is contained in:

committed by
David S. Miller

parent
770ce0078c
commit
5a2b242563
@@ -463,6 +463,16 @@ static const struct option longopts[] = {
|
||||
.has_arg = required_argument,
|
||||
.val = 'p',
|
||||
},
|
||||
{
|
||||
.name = "list",
|
||||
.has_arg = no_argument,
|
||||
.val = 'l',
|
||||
},
|
||||
{
|
||||
.name = "skip",
|
||||
.has_arg = required_argument,
|
||||
.val = 's',
|
||||
},
|
||||
{
|
||||
.name = "help",
|
||||
.has_arg = no_argument,
|
||||
@@ -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();
|
||||
|
Reference in New Issue
Block a user