ovs-ofctl: Bug fix in flow_format()
[sliver-openvswitch.git] / tests / ofp-print.at
index a7fef55..22886fc 100644 (file)
@@ -475,11 +475,11 @@ AT_CHECK([ovs-ofctl ofp-print "\
 03 0a 00 4c 00 00 00 00 ff ff ff 00 00 2a 00 00 \
 00 01 00 0c 80 00 00 04 ff ff ff fe 00 00 00 00 \
 00 00 ff ff ff ff ff ff 00 23 20 83 c1 5f 80 35 \
-00 01 08 00 06 04 00 03 00 23 20 83 c1 5f 00 00 \
+00 01 08 00 06 04 00 01 00 23 20 83 c1 5f 00 00 \
 00 00 00 23 20 83 c1 5f 00 00 00 00 \
 "], [0], [dnl
 OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=42 in_port=LOCAL (via no_match) data_len=42 buffer=0xffffff00
-rarp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=00:23:20:83:c1:5f,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=3,arp_sha=00:23:20:83:c1:5f,arp_tha=00:23:20:83:c1:5f
+rarp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=00:23:20:83:c1:5f,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=1,arp_sha=00:23:20:83:c1:5f,arp_tha=00:23:20:83:c1:5f
 ])
 AT_CLEANUP
 
@@ -699,6 +699,26 @@ ofp_util|INFO|post: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_ds
 ])
 AT_CLEANUP
 
+# The flow is formatted with cls_rule_format() for the low-verbosity case.
+AT_SETUP([OFPT_FLOW_MOD - OF1.1 - low verbosity])
+AT_KEYWORDS([ofp-print])
+AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
+020e 0090 01020304 \
+da1aa3e035d87158 ffffffffffffffff \
+02 01 003c 0078 9c40 ffffffff ffffffff ffffffff 0003 \
+0000 \
+\
+0000 0058 00000000 000003f7 \
+000000000000ffffffffffff 000000000000ffffffffffff \
+0000 00 00 0806 00 00 c0a88000000000ff 00000000ffffffff 0000 0000 \
+00000000 00 000000 0000000000000000ffffffffffffffff \
+\
+0001 0008 03 000000 \
+" 2], [0], [dnl
+OFPT_FLOW_MOD (OF1.1) (xid=0x1020304): MOD table:2 priority=40000,arp,arp_spa=192.168.128.0/24 cookie:0xda1aa3e035d87158/0xffffffffffffffff idle:60 hard:120 send_flow_rem check_overlap actions=goto_table:3
+])
+AT_CLEANUP
+
 # The flow is formatted with cls_rule_format() for the low-verbosity case.
 AT_SETUP([OFPT_FLOW_MOD - OF1.2 - low verbosity])
 AT_KEYWORDS([ofp-print])
@@ -1652,20 +1672,20 @@ AT_CHECK([ovs-ofctl ofp-print "\
 04 13 00 90 00 00 00 02 00 09 00 00 00 00 00 00 \
 00 00 00 01 00 48 00 00 00 00 00 00 00 00 00 05 \
 00 00 00 00 00 00 10 00 00 00 00 00 00 02 30 00 \
-00 00 01 8a 9a 6e 23 44 \
+00 00 01 8a 0a 6e 23 44 \
 00 00 00 00 00 00 00 7e 00 00 00 00 00 00 34 33 \
 00 00 00 00 00 00 00 e7 00 00 00 00 00 00 94 2e \
 00 00 00 02 00 38 00 00 00 00 00 00 00 00 00 02 \
 00 00 00 00 00 00 02 00 00 00 00 00 00 00 30 00 \
-00 00 01 87 9a 23 6e 44 \
+00 00 01 87 0a 23 6e 44 \
 00 00 00 00 00 00 00 2a 00 00 00 00 00 00 04 33 \
 "], [0], [dnl
 OFPST_METER reply (OF1.3) (xid=0x2):
-meter:1 flow_count:5 packet_in_count:4096 byte_in_count:143360 duration:394.2590909252s bands:
+meter:1 flow_count:5 packet_in_count:4096 byte_in_count:143360 duration:394.174990148s bands:
 0: packet_count:126 byte_count:13363
 1: packet_count:231 byte_count:37934
 
-meter:2 flow_count:2 packet_in_count:512 byte_in_count:12288 duration:391.2586013252s bands:
+meter:2 flow_count:2 packet_in_count:512 byte_in_count:12288 duration:391.170094148s bands:
 0: packet_count:42 byte_count:1075
 ])
 AT_CLEANUP