diff options
Diffstat (limited to 'tests/common-cli.c')
| -rw-r--r-- | tests/common-cli.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/common-cli.c b/tests/common-cli.c index aed20b2d53..47476711c6 100644 --- a/tests/common-cli.c +++ b/tests/common-cli.c @@ -34,13 +34,13 @@ struct thread_master *master; int dump_args(struct vty *vty, const char *descr, - int argc, const char **argv) + int argc, struct cmd_token *argv[]) { int i; vty_out (vty, "%s with %d args.%s", descr, argc, VTY_NEWLINE); for (i = 0; i < argc; i++) { - vty_out (vty, "[%02d]: %s%s", i, argv[i], VTY_NEWLINE); + vty_out (vty, "[%02d]: %s%s", i, argv[i]->arg, VTY_NEWLINE); } return CMD_SUCCESS; @@ -49,6 +49,12 @@ int dump_args(struct vty *vty, const char *descr, static void vty_do_exit(void) { printf ("\nend.\n"); + cmd_terminate (); + vty_terminate (); + thread_master_free (master); + closezlog (zlog_default); + + log_memstats_stderr ("testcli"); exit (0); } @@ -72,7 +78,7 @@ main (int argc, char **argv) /* Library inits. */ cmd_init (1); - host.name = strdup ("test"); + cmd_hostname_set ("test"); vty_init (master); memory_init (); |
