[ovs-dev] [Single DP 09/15] tests: Rewrite unit tests to not expect bridge with odp zero.
blp at nicira.com
Mon Oct 22 22:21:13 UTC 2012
On Thu, Oct 18, 2012 at 12:51:54PM -0700, Justin Pettit wrote:
> A future commit will make all bridges of a particular type share a
> single backing datapath. That backing datapath will have a datapath
> port number of zero and bridges will be assigned other numbers. This
> commit modifies the tests so that they don't expect port zero.
> It adopts the convention that bridges of type "dummy" with a name of the
> form "test-br<n>" will be assigned a port number of 100+<n>.
> Signed-off-by: Justin Pettit <jpettit at nicira.com>
"git am" says:
Applying: tests: Rewrite unit tests to not expect bridge with odp zero.
/home/blp/ovs/.git/rebase-apply/patch:2440: trailing whitespace.
/home/blp/ovs/.git/rebase-apply/patch:2472: trailing whitespace.
AT_CHECK([RUN_OVS_VSCTL([list b], [get b test-br0 _uuid])],
/home/blp/ovs/.git/rebase-apply/patch:2526: trailing whitespace.
add bridge test-br0 external_ids '"roles"="local; remote; cloud"'])],
/home/blp/ovs/.git/rebase-apply/patch:2529: trailing whitespace.
AT_CHECK([RUN_OVS_VSCTL_ONELINE([get bridge test-br0 other_config external-ids])],
/home/blp/ovs/.git/rebase-apply/patch:2533: trailing whitespace.
AT_CHECK([RUN_OVS_VSCTL([get bridge test-br0 other_config:hwaddr -- --if-exists get bridge test-br0 other-config:nonexistent])],
warning: squelched 21 whitespace errors
warning: 26 lines add whitespace errors.
This isn't a particularly elegant solution, but it's only
incrementally less elegant than what came before it, and it's only
test code so I don't feel too bad about it.
If there's one change that I'd make, it's to just get rid of the
"test-" prefix everywhere. netdev-dummy is only good for testing
anyway and I wouldn't feel bad about special-casing all br* devices
there. This would also make the diff slightly smaller. But I don't
feel bad about keeping it, either, if you don't want to deal with it.
More information about the dev