[ovs-dev] [PATCH 1/2] table: Create method for resetting table formatting.

Ben Pfaff blp at ovn.org
Mon Oct 8 15:35:44 UTC 2018

On Fri, Oct 05, 2018 at 06:40:33PM -0400, Mark Michelson wrote:
> Table formatting has a local static integer that is intended to insert
> line breaks between tables. This works exactly as intended, as long as
> each call to table_format() is done as a single unit within the run of a
> process.
> When ovn-nbctl is run in daemon mode, it is a long-running process that
> makes multiple calls to table_format() throughout its lifetime. After
> the first call, this results in an unexpected newline prepended to table
> output on each subsequent ovn-nbctl invocation.
> The solution is to introduce a function to reset table formatting. This
> way, the first time after resetting table formatting, no newline is
> prepended.
> Signed-off-by: Mark Michelson <mmichels at redhat.com>

This seems like it could use a test, too.

More information about the dev mailing list