summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ofp-print.at44
-rw-r--r--tests/ofproto.at16
2 files changed, 37 insertions, 23 deletions
diff --git a/tests/ofp-print.at b/tests/ofp-print.at
index 03509b65c..c2018c77c 100644
--- a/tests/ofp-print.at
+++ b/tests/ofp-print.at
@@ -138,19 +138,27 @@ ff fe 50 54 00 00 00 01 62 72 30 00 00 00 00 00 \
OFPT_FEATURES_REPLY (xid=0x1): ver:0x1, dpid:0000505400000001
n_tables:2, n_buffers:256
features: capabilities:0x87, actions:0xfff
- 1(eth1): addr:50:54:00:00:00:02, config: 0, state:0
- current: 100MB-FD AUTO_NEG @&t@
- advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG @&t@
- supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG @&t@
- 2(eth2): addr:50:54:00:00:00:03, config: 0, state:0
- current: 100MB-FD AUTO_NEG @&t@
- advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG @&t@
- supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG @&t@
- 3(eth0): addr:50:54:00:00:00:01, config: 0, state:0
- current: 100MB-FD AUTO_NEG @&t@
- advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG @&t@
- supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG @&t@
- LOCAL(br0): addr:50:54:00:00:00:01, config: 0x1, state:0x1
+ 1(eth1): addr:50:54:00:00:00:02
+ config: 0
+ state: 0
+ current: 100MB-FD AUTO_NEG
+ advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
+ supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
+ 2(eth2): addr:50:54:00:00:00:03
+ config: 0
+ state: 0
+ current: 100MB-FD AUTO_NEG
+ advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
+ supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
+ 3(eth0): addr:50:54:00:00:00:01
+ config: 0
+ state: 0
+ current: 100MB-FD AUTO_NEG
+ advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
+ supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
+ LOCAL(br0): addr:50:54:00:00:00:01
+ config: PORT_DOWN
+ state: LINK_DOWN
])
AT_CLEANUP
@@ -256,10 +264,12 @@ AT_CHECK([ovs-ofctl ofp-print "\
00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
"], [0], [dnl
-OFPT_PORT_STATUS (xid=0x0): MOD: 3(eth0): addr:50:54:00:00:00:01, config: 0x1, state:0x1
- current: 100MB-FD AUTO_NEG @&t@
- advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG @&t@
- supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG @&t@
+OFPT_PORT_STATUS (xid=0x0): MOD: 3(eth0): addr:50:54:00:00:00:01
+ config: PORT_DOWN
+ state: LINK_DOWN
+ current: 100MB-FD AUTO_NEG
+ advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
+ supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
])
AT_CLEANUP
diff --git a/tests/ofproto.at b/tests/ofproto.at
index e6def3ec7..f29921843 100644
--- a/tests/ofproto.at
+++ b/tests/ofproto.at
@@ -13,7 +13,9 @@ AT_CHECK([STRIP_XIDS stdout], [0], [dnl
OFPT_FEATURES_REPLY: ver:0x1, dpid:fedcba9876543210
n_tables:1, n_buffers:256
features: capabilities:0x87, actions:0xfff
- LOCAL(br0): addr:aa:55:aa:55:00:00, config: 0x1, state:0x1
+ LOCAL(br0): addr:aa:55:aa:55:00:00
+ config: PORT_DOWN
+ state: LINK_DOWN
OFPT_GET_CONFIG_REPLY: frags=normal miss_send_len=0
])
OFPROTO_STOP
@@ -23,19 +25,21 @@ AT_SETUP([ofproto - mod-port])
OFPROTO_START
for command_config_state in \
'up 0 0' \
- 'noflood 0x10 0' \
- 'down 0x11 0x1' \
- 'flood 0x1 0x1'
+ 'noflood NO_FLOOD 0' \
+ 'down PORT_DOWN,NO_FLOOD LINK_DOWN' \
+ 'flood PORT_DOWN LINK_DOWN'
do
set $command_config_state
- command=$[1] config=$[2] state=$[3]
+ command=$[1] config=`echo $[2] | sed 's/,/ /g'` state=$[3]
AT_CHECK([ovs-ofctl -vANY:ANY:WARN mod-port br0 br0 $command])
AT_CHECK([ovs-ofctl -vANY:ANY:WARN show br0], [0], [stdout])
AT_CHECK_UNQUOTED([STRIP_XIDS stdout], [0], [dnl
OFPT_FEATURES_REPLY: ver:0x1, dpid:fedcba9876543210
n_tables:1, n_buffers:256
features: capabilities:0x87, actions:0xfff
- LOCAL(br0): addr:aa:55:aa:55:00:00, config: $config, state:$state
+ LOCAL(br0): addr:aa:55:aa:55:00:00
+ config: $config
+ state: $state
OFPT_GET_CONFIG_REPLY: frags=normal miss_send_len=0
])
done