diff options
author | Ilya Maximets <i.maximets@samsung.com> | 2018-08-14 10:53:16 +0300 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-08-15 11:36:18 -0700 |
commit | 9551e80befc0f8ecc5ee8a7e025147358c2753ee (patch) | |
tree | 02defe18c297a92f9426f74918ed2f4bb335f51d /ovsdb | |
parent | cbcf40a847c0539fec36e82410f0966f13517964 (diff) | |
download | openvswitch-9551e80befc0f8ecc5ee8a7e025147358c2753ee.tar.gz |
tests: Use environment variable for default timeout.
Introduce new 'OVS_CTL_TIMEOUT' environment variable
that, if set, will be used as a default timeout for
OVS control utilities. Setting it in 'atlocal.in' will
cover all the hangs inside the testsuite, even when
utils called in a subshell.
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovsdb')
-rw-r--r-- | ovsdb/ovsdb-client.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ovsdb/ovsdb-client.c b/ovsdb/ovsdb-client.c index 7f0218814..18cc13588 100644 --- a/ovsdb/ovsdb-client.c +++ b/ovsdb/ovsdb-client.c @@ -328,11 +328,11 @@ parse_options(int argc, char *argv[]) {NULL, 0, NULL, 0}, }; char *short_options = ovs_cmdl_long_options_to_short_options(long_options); + unsigned int timeout = 0; table_style.format = TF_TABLE; for (;;) { - unsigned int timeout = 0; int c; c = getopt_long(argc, argv, short_options, long_options, NULL); @@ -368,8 +368,6 @@ parse_options(int argc, char *argv[]) case 't': if (!str_to_uint(optarg, 10, &timeout) || !timeout) { ovs_fatal(0, "value %s on -t or --timeout is invalid", optarg); - } else { - time_alarm(timeout); } break; @@ -393,6 +391,8 @@ parse_options(int argc, char *argv[]) } } free(short_options); + + ctl_timeout_setup(timeout); } static void |