aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-07-21 14:44:54 -0700
committerBen Pfaff <blp@nicira.com>2011-07-27 15:00:34 -0700
commiteaa6eb2afd76819de5df0ae9ed753627504ed7e4 (patch)
tree47e5fa367e6224739c2ae91408e1ccb8bd1cf7ae /tests
parentc4ea79bf9c68a4d040a499d142e121f01b314242 (diff)
ovs-ofctl: Fix dump-ports and queue-stats commands.
These ovs-ofctl commands have been sending malformed stats requests since commit 63f2140a553 "openflow: Make stats replies more like other OpenFlow messages." This commit fixes the problem and adds basic unit tests that should prevent similar regressions. Reported-by: Hao Zheng <hzheng@nicira.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/ofproto.at24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/ofproto.at b/tests/ofproto.at
index f2992184..ca8a558e 100644
--- a/tests/ofproto.at
+++ b/tests/ofproto.at
@@ -21,6 +21,30 @@ OFPT_GET_CONFIG_REPLY: frags=normal miss_send_len=0
OFPROTO_STOP
AT_CLEANUP
+dnl This is really bare-bones.
+dnl It at least checks request and reply serialization and deserialization.
+AT_SETUP([ofproto - port stats])
+OFPROTO_START
+AT_CHECK([ovs-ofctl -vANY:ANY:WARN dump-ports br0], [0], [stdout])
+AT_CHECK([STRIP_XIDS stdout], [0], [dnl
+OFPST_PORT reply: 1 ports
+ port 65534: rx pkts=0, bytes=0, drop=0, errs=0, frame=0, over=0, crc=0
+ tx pkts=0, bytes=0, drop=0, errs=0, coll=0
+])
+OFPROTO_STOP
+AT_CLEANUP
+
+dnl This is really bare-bones.
+dnl It at least checks request and reply serialization and deserialization.
+AT_SETUP([ofproto - queue stats])
+OFPROTO_START
+AT_CHECK([ovs-ofctl -vANY:ANY:WARN queue-stats br0], [0], [stdout])
+AT_CHECK([STRIP_XIDS stdout], [0], [dnl
+OFPST_QUEUE reply: 0 queues
+])
+OFPROTO_STOP
+AT_CLEANUP
+
AT_SETUP([ofproto - mod-port])
OFPROTO_START
for command_config_state in \