tests/ofproto-dpif: Use vlog to test dpif behaviour.
authorJoe Stringer <joestringer@nicira.com>
Wed, 9 Apr 2014 23:14:07 +0000 (11:14 +1200)
committerBen Pfaff <blp@nicira.com>
Wed, 9 Apr 2014 23:26:50 +0000 (16:26 -0700)
commitc2a77f33adec720dd0551361c44359710ff15a03
treea22a229f92624b407201f750a61e64989ca9393f
parent4479846e52373d491f11b2bddaa5adaf54ca325d
tests/ofproto-dpif: Use vlog to test dpif behaviour.

Previously we made heavy use of the 'ovs-appctl dpif/dump-flows' command
to verify that flows were being installed into the datapath correctly.
However this is sensitive to timing, particularly when the behaviour of
revalidator threads is modified. A common race condition involves flows
being revalidated and deleted before the test script gets a chance to
connect to ovs-vswitchd and dump the datapath flows.

This patch reworks the tests to make use of the vlog facility for dpif,
checking for flow installation and flow dump messages. Most tests are
converted to check for flow installation, which should reduce these race
conditions significantly. For tests that require packet counts, these
will continue to check for flow_dump messages. Race conditions for these
should be reduced but not eliminated.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
tests/ofproto-dpif.at