Re: [vpp-dev] unformat %s eats newlines

2018-02-02 Thread Dave Barach (dbarach)
Folks who need even slightly bulletproof configuration methods should use binary APIs: directly from C or through one of several language bindings. Debug CLI is a developer’s tool, subject to change without notice, and supported at the implementer’s discretion. Extra and/or unparsed input shoul

Re: [vpp-dev] VXLAN Tunnel IF Names

2018-02-02 Thread Klement Sekera -X (ksekera - PANTHEON TECHNOLOGIES at Cisco)
Hi, There are even more filtering options, allowing you to specify a class or a single test function within a test case if needed. Please consult `make test-help`. Regards, Klement > -Original Message- > From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On > Behalf

Re: [vpp-dev] VXLAN Tunnel IF Names

2018-02-02 Thread John Lo (loj)
Hi Jon, You can easily run just vxlan tests by “make test TEST=vxlan”, or better yet “make test-debug TEST=vxlan”, to run just test_vxlan.py script in VPP normal or debug mode. Similarly for other test cases. Regards, John From: Jon Loeliger [mailto:j...@netgate.com] Sent: Friday, February 02,

Re: [vpp-dev] VXLAN Tunnel IF Names

2018-02-02 Thread Jon Loeliger
On Fri, Feb 2, 2018 at 3:08 PM, Jon Loeliger wrote: > > I have submitted a patch to Gerrit. When this passes "verify", I'll add > you to be > a Reviewer! > John, How do I run just these tests locally? I need to determine if these failures are due to my patch or not. Specifically, I am not ab

Re: [vpp-dev] VXLAN Tunnel IF Names

2018-02-02 Thread Jon Loeliger
On Wed, Jan 31, 2018 at 6:41 PM, John Lo (loj) wrote: > Hi Jon, > Hi John, Thanks for taking the time to get back to me on this! All VPP tunnel creation uses the mechanism of returning a sw_if_index of > the created tunnel. > I know. I get that. It works. > The name of the tunnel is then

Re: [vpp-dev] unformat %s eats newlines

2018-02-02 Thread Andreas Schultz
Florin Coras schrieb am Fr., 2. Feb. 2018 um 18:57 Uhr: > Not exactly the most elegant solution but have you tried adding a space > after the string to be parsed? > Tried that, but doesn't help. Andreas Florin > > > On Feb 2, 2018, at 9:47 AM, Andreas Schultz < > andreas.schu...@travelping.com

Re: [vpp-dev] unformat %s eats newlines

2018-02-02 Thread Andreas Schultz
Dave Barach (dbarach) schrieb am Fr., 2. Feb. 2018 um 19:22 Uhr: > Why not simply: > > > > while (…) > > { > > if (unformat(input, “name %s”, &name)) > > ; > > else if (…) > > ; > > else > > break; > > } > > > > if () > > return clib_error_return (0, "parse error: '%U'", > >

Re: [vpp-dev] unformat %s eats newlines

2018-02-02 Thread Dave Barach (dbarach)
Why not simply: while (…) { if (unformat(input, “name %s”, &name)) ; else if (…) ; else break; } if () return clib_error_return (0, "parse error: '%U'", format_unformat_error, input); D. From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io

Re: [vpp-dev] unformat %s eats newlines

2018-02-02 Thread Florin Coras
Not exactly the most elegant solution but have you tried adding a space after the string to be parsed? Florin > On Feb 2, 2018, at 9:47 AM, Andreas Schultz > wrote: > > A typical construct to parse arguments is to use unformat in a while loop > that checks for UNFORMAT_END_OF_INPUT. > For mu

[vpp-dev] unformat %s eats newlines

2018-02-02 Thread Andreas Schultz
A typical construct to parse arguments is to use unformat in a while loop that checks for UNFORMAT_END_OF_INPUT. For multiline input that relies on the detection of "\n" in the input stream. The problem is that a construct like: unformat (input, "name %_%v%_", &name) eats the newline when it