1 AT_BANNER([OpenFlow utilities])
3 AT_SETUP([encoding hellos])
4 dnl All versions up to a max version supported:
5 AT_CHECK([ovs-ofctl encode-hello 0x2], [0], [dnl
6 00000000 01 00 00 08 00 00 00 01
10 AT_CHECK([ovs-ofctl encode-hello 0x6], [0], [dnl
11 00000000 02 00 00 08 00 00 00 01
12 OFPT_HELLO (OF1.1) (xid=0x1):
13 version bitmap: 0x01, 0x02
15 AT_CHECK([ovs-ofctl encode-hello 0xe], [0], [dnl
16 00000000 03 00 00 08 00 00 00 01
17 OFPT_HELLO (OF1.2) (xid=0x1):
18 version bitmap: 0x01, 0x02, 0x03
20 AT_CHECK([ovs-ofctl encode-hello 0x1e], [0], [dnl
21 00000000 04 00 00 08 00 00 00 01
22 OFPT_HELLO (OF1.3) (xid=0x1):
23 version bitmap: 0x01, 0x02, 0x03, 0x04
25 AT_CHECK([ovs-ofctl encode-hello 0x3e], [0], [dnl
26 00000000 05 00 00 08 00 00 00 01
27 OFPT_HELLO (OF1.4) (xid=0x1):
28 version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05
31 dnl Some versions below max version missing.
32 AT_CHECK([ovs-ofctl encode-hello 0xc], [0], [dnl
33 00000000 03 00 00 10 00 00 00 01-00 01 00 08 00 00 00 0c
34 OFPT_HELLO (OF1.2) (xid=0x1):
35 version bitmap: 0x02, 0x03
37 AT_CHECK([ovs-ofctl encode-hello 0xa], [0], [dnl
38 00000000 03 00 00 10 00 00 00 01-00 01 00 08 00 00 00 0a
39 OFPT_HELLO (OF1.2) (xid=0x1):
40 version bitmap: 0x01, 0x03
42 AT_CHECK([ovs-ofctl encode-hello 0x8], [0], [dnl
43 00000000 03 00 00 10 00 00 00 01-00 01 00 08 00 00 00 08
44 OFPT_HELLO (OF1.2) (xid=0x1):
47 AT_CHECK([ovs-ofctl encode-hello 0x4], [0], [dnl
48 00000000 02 00 00 10 00 00 00 01-00 01 00 08 00 00 00 04
49 OFPT_HELLO (OF1.1) (xid=0x1):
54 AT_SETUP([parsing key-value pairs])
56 AT_CHECK([ovs-ofctl parse-key-value a a,b 'a b' 'a b' 'a
65 AT_CHECK([ovs-ofctl parse-key-value a:b a=b a:b,c=d 'a=b c' 'a(b)' 'a(b),c(d)'], 0,
74 dnl Values that contain nested delimiters.
75 AT_CHECK([ovs-ofctl parse-key-value 'a:(b,c)' 'a:b(c,d)e' 'a(b,c(d,e),f)'], 0,
81 dnl Extraneous delimiters.
82 AT_CHECK([ovs-ofctl parse-key-value a,,b ',a b' ' a b ,'], 0, [a, b
87 dnl Missing right parentheses.
89 dnl m4 can't handle unbalanced parentheses so we use @{:@, which
90 dnl Autotest replaces by a left parenthesis.
91 AT_CHECK([ovs-ofctl parse-key-value 'a@{:@b' 'a@{:@b(c)' 'a=b@{:@c'], 0, [a=b