[ovs-git] Open vSwitch: tests: Check ovs-openflowd log output instead of ignoring it. (master)

dev at openvswitch.org dev at openvswitch.org
Fri May 13 22:31:45 UTC 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, master has been updated
       via  35fe11834c85bf7fd86fa1a71f5415c2ca1d64d0 (commit)
       via  488d734d6e57cd209058fd7d1a18abdf46b6bf51 (commit)
       via  bd3932826b3d9153f6d026adaad2439ac23f2fcd (commit)
       via  1c0b7503afdd750a7f2cadcd63b65d64889366c9 (commit)
       via  34276a57908ddac57a1f7f67addad7896503055a (commit)
       via  f1f41fb6b9ad166769fedacf66aca3b0364ced29 (commit)
       via  bc9dcfb37146e813200ffcc552365c8ec3e72ff8 (commit)
       via  7fcfe998c5e3356fe04fb183f9f33d3c9fbbb387 (commit)
      from  f89ffb0e2f6fa8adc100192ea4b5f948170d8d57 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 35fe11834c85bf7fd86fa1a71f5415c2ca1d64d0
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=35fe11834c85bf7fd86fa1a71f5415c2ca1d64d0
Author: Ben Pfaff <blp at nicira.com>
		
tests: Check ovs-openflowd log output instead of ignoring it.
		
ovs-openflowd outputs a number of log messages that we don't want to
suppress.  We do want to know if it logs anything that we don't expect.
So this commit starts checking the log output, discarding any normal,
expected messages.

Reviewed-by: Simon Horman <horms at verge.net.au>


commit 488d734d6e57cd209058fd7d1a18abdf46b6bf51
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=488d734d6e57cd209058fd7d1a18abdf46b6bf51
Author: Ben Pfaff <blp at nicira.com>
		
netdev-linux: Open AF_PACKET socket only when it is needed.
		
Only a privileged process can open a raw AF_PACKET socket, so netdev-linux
will fail to initialize if run as non-root and you get a cascade of error
messages, like this:

netdev_linux|ERR|failed to create packet socket: Operation not permitted
netdev|ERR|failed to initialize system network device class: Operation not permitted
netdev|ERR|failed to initialize internal network device class: Operation not permitted
netdev|ERR|failed to initialize tap network device class: Operation not permitted

But in fact the AF_PACKET socket is not needed for most operations (only
for sending packets) and it is never needed for testing with the "dummy"
datapath and network device, so we can avoid logging all of these errors
by opening the packet socket only on demand, as this commit does.

Reviewed-by: Simon Horman <horms at verge.net.au>


commit bd3932826b3d9153f6d026adaad2439ac23f2fcd
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=bd3932826b3d9153f6d026adaad2439ac23f2fcd
Author: Ben Pfaff <blp at nicira.com>
		
netdev-linux: Only call set_nonblocking() if socket creation succeeds.
		
Reviewed-by: Simon Horman <horms at verge.net.au>


commit 1c0b7503afdd750a7f2cadcd63b65d64889366c9
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=1c0b7503afdd750a7f2cadcd63b65d64889366c9
Author: Ben Pfaff <blp at nicira.com>
		
ofp-util: Revise OpenFlow 1.0 ofp_match normalization.
		
For a long time, Open vSwitch has "normalized" OpenFlow 1.0 flows in a
funny way: it tries to change fields that are wildcarded into fields
that are exact-match.  For example, the normalize_match() function
knows that if dl_type is wildcarded, then all of the L3 and L4 fields
will always be extracted as 0, so it sets those fields to exact-match
and their values to 0.

The reason for this was originally that exact-match flows were much
cheaper for Open vSwitch to implement, because they could be implemented
with a hash table, whereas other kinds of flows had to be implemented
with an expensive linear search.  But these days Open vSwitch has a
smarter classifier in which wildcarded flows have minimal cost.  Also,
it is no longer possible for OpenFlow 1.0 to specify truly exact-match
flows, because Open vSwitch supports fields for which OpenFlow 1.0
cannot specify values and therefore will always be wildcarded.

Now, it no longer makes sense to do this transformation, so this commit
removes it.  Presumably, this will be less surprising for users.

Reviewed-by: Simon Horman <horms at verge.net.au>


commit 34276a57908ddac57a1f7f67addad7896503055a
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=34276a57908ddac57a1f7f67addad7896503055a
Author: Ben Pfaff <blp at nicira.com>
		
ofp-util: Simplify OpenFlow 1.0 ofp_match normalization.
		
The normalize_match() function does more work than really needed.  It goes
to some trouble to zero out fields that are wildcarded.  This is not
necessary, because cls_rule_from_match() will take care of it later.

Also make normalize_match() private to ofp-util.c, since it has no other
users now and I don't expect more later.

Reviewed-by: Simon Horman <horms at verge.net.au>


commit f1f41fb6b9ad166769fedacf66aca3b0364ced29
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=f1f41fb6b9ad166769fedacf66aca3b0364ced29
Author: Ben Pfaff <blp at nicira.com>
		
ofp-util: Don't warn for different forms of nw_{src,dst} wildcards.
		
OpenFlow 1.0 uses a 6-bit field to express the number of wildcarded bits
in the nw_src and nw_dst field.  Any value 32 or greater in these fields
(binary 1xxxxx) means that all of the bits are wildcarded.  That means
that there are 32 different ways to express a wildcarded nw_src or nw_dst.
At least two of those seem sensible (100000 and 111111) so we shouldn't
warn about one of them.

This fixes the problem by ORing with 100000 instead of 111111, so that any
already-correct wildcarded mask won't be affected.

This fix allows us to update some tests.

Reviewed-by: Simon Horman <horms at verge.net.au>


commit bc9dcfb37146e813200ffcc552365c8ec3e72ff8
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=bc9dcfb37146e813200ffcc552365c8ec3e72ff8
Author: Ben Pfaff <blp at nicira.com>
		
lockfile: Don't warn if successful lock takes a little time.
		
This code issues a warning if obtaining a lock takes even 1 millisecond.
That's far too aggressive.  There's no need to warn if we have to wait
a few milliseconds.  This function already warns elsewhere if locking takes
more than 1 second, which is much more reasonable.

This change allows us to test ovsdb-server stderr output more carefully.
Before now, the tests had to ignore what ovsdb-server writes to stderr
because sometimes it would log a warning that locking took 1 ms (or so).

Reviewed-by: Simon Horman <horms at verge.net.au>


commit 7fcfe998c5e3356fe04fb183f9f33d3c9fbbb387
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=7fcfe998c5e3356fe04fb183f9f33d3c9fbbb387
Author: Ben Pfaff <blp at nicira.com>
		
tests: Check test output more carefully.
		
It's better to check output than to ignore it, because ignoring
output can fail to detect real bugs later if the output changes.

Reviewed-by: Simon Horman <horms at verge.net.au>


-----------------------------------------------------------------------

Summary of changes:
 lib/lockfile.c          |   11 +---
 lib/netdev-linux.c      |   38 ++++++++---
 lib/ofp-util.c          |  162 ++++++++++++-----------------------------------
 lib/ofp-util.h          |    2 -
 tests/autopath.at       |    4 +-
 tests/daemon-py.at      |   10 ++--
 tests/daemon.at         |   10 ++--
 tests/jsonrpc-py.at     |    6 +-
 tests/jsonrpc.at        |    6 +-
 tests/library.at        |   21 ++++---
 tests/ofp-print.at      |   16 ++++-
 tests/ofproto-macros.at |    8 ++-
 tests/ovs-ofctl.at      |   13 +----
 tests/ovsdb-log.at      |    2 +-
 tests/ovsdb-server.at   |   12 ++--
 tests/test-strtok_r.c   |    2 +-
 16 files changed, 130 insertions(+), 193 deletions(-)


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list