git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prepare for post-2.2.0 (2.2.90).
[sliver-openvswitch.git]
/
tests
/
test-reconnect.c
diff --git
a/tests/test-reconnect.c
b/tests/test-reconnect.c
index
d3ff6e8
..
35d5f41
100644
(file)
--- a/
tests/test-reconnect.c
+++ b/
tests/test-reconnect.c
@@
-33,11
+33,10
@@
static struct reconnect *reconnect;
static int now;
static struct reconnect *reconnect;
static int now;
-static const struct command commands[];
-
static void diff_stats(const struct reconnect_stats *old,
const struct reconnect_stats *new,
int delta);
static void diff_stats(const struct reconnect_stats *old,
const struct reconnect_stats *new,
int delta);
+static const struct command *get_all_commands(void);
static void
test_reconnect_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
static void
test_reconnect_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
@@
-70,7
+69,7
@@
test_reconnect_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
svec_parse_words(&args, line);
svec_terminate(&args);
if (!svec_is_empty(&args)) {
svec_parse_words(&args, line);
svec_terminate(&args);
if (!svec_is_empty(&args)) {
- run_command(args.n, args.names,
commands
);
+ run_command(args.n, args.names,
get_all_commands()
);
}
svec_destroy(&args);
}
svec_destroy(&args);
@@
-271,7
+270,7
@@
do_listen_error(int argc OVS_UNUSED, char *argv[])
reconnect_listen_error(reconnect, now, atoi(argv[1]));
}
reconnect_listen_error(reconnect, now, atoi(argv[1]));
}
-static const struct command commands[] = {
+static const struct command
all_
commands[] = {
{ "enable", 0, 0, do_enable },
{ "disable", 0, 0, do_disable },
{ "force-reconnect", 0, 0, do_force_reconnect },
{ "enable", 0, 0, do_enable },
{ "disable", 0, 0, do_disable },
{ "force-reconnect", 0, 0, do_force_reconnect },
@@
-290,4
+289,10
@@
static const struct command commands[] = {
{ NULL, 0, 0, NULL },
};
{ NULL, 0, 0, NULL },
};
+static const struct command *
+get_all_commands(void)
+{
+ return all_commands;
+}
+
OVSTEST_REGISTER("test-reconnect", test_reconnect_main);
OVSTEST_REGISTER("test-reconnect", test_reconnect_main);