Message ID | 20180707111004.8320-3-jkbs@redhat.com |
---|---|
State | Accepted |
Headers | show |
Series | Get rid of ctl_fatal() calls in ovn-nbctl (part 1) | expand |
On Sat, Jul 07, 2018 at 01:09:36PM +0200, Jakub Sitnicki wrote: > Fix a typo that went undetected by tests because we don't have any test > cases for error paths when using database commands with ovn-nbctl. > > Fixes: 675b152e999f ("db-ctl-base: Extend ctl_context with an error message.") > Signed-off-by: Jakub Sitnicki <jkbs@redhat.com> Probably, we should add a test?
On Mon, 9 Jul 2018 15:47:34 -0700 Ben Pfaff <blp@ovn.org> wrote: > On Sat, Jul 07, 2018 at 01:09:36PM +0200, Jakub Sitnicki wrote: > > Fix a typo that went undetected by tests because we don't have any test > > cases for error paths when using database commands with ovn-nbctl. > > > > Fixes: 675b152e999f ("db-ctl-base: Extend ctl_context with an error message.") > > Signed-off-by: Jakub Sitnicki <jkbs@redhat.com> > > Probably, we should add a test? Definitely. Will do it. I'm planning to extend the tests as I deal with the remaining users of ctl_fatal().
diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c index fbdb5a4d9..762348ccb 100644 --- a/ovn/utilities/ovn-nbctl.c +++ b/ovn/utilities/ovn-nbctl.c @@ -3843,7 +3843,7 @@ do_nbctl(const char *args, struct ctl_command *commands, size_t n_commands, (c->syntax->run)(&ctx); } if (ctx.error) { - ctl_fatal("%s", error); + ctl_fatal("%s", ctx.error); } ctl_context_done_command(&ctx, c);
Fix a typo that went undetected by tests because we don't have any test cases for error paths when using database commands with ovn-nbctl. Fixes: 675b152e999f ("db-ctl-base: Extend ctl_context with an error message.") Signed-off-by: Jakub Sitnicki <jkbs@redhat.com> --- ovn/utilities/ovn-nbctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)