blob: dfecec78012f0c0b606bd54461953fef7b351390 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
set timeout 10
set testprefix "aspathtest "
set aborted 0
set color 1
spawn "./aspathtest"
# proc onetest { test_name note start } {
# proc headerline { line } {
set parserno 0
proc parsertest { test_name } {
global parserno
headerline "test $parserno"
onetest "parse $test_name" " ($parserno)" "$test_name:"
onetest "parse $test_name +empty_prepend" " (#$parserno)" "empty prepend $test_name:"
incr parserno 1
}
set attrno 0
proc attrtest { test_name } {
global attrno
headerline "aspath_attr test $attrno"
onetest "attr $test_name" " (#$attrno)" "$test_name"
incr attrno 1
}
parsertest "seq1"
parsertest "seq2"
parsertest "seq3"
parsertest "seqset"
parsertest "seqset2"
parsertest "multi"
parsertest "confed"
parsertest "confed2"
parsertest "confset"
parsertest "confmulti"
parsertest "seq4"
parsertest "tripleseq1"
parsertest "someprivate"
parsertest "allprivate"
parsertest "long"
parsertest "seq1extra"
parsertest "empty"
parsertest "redundantset"
parsertest "reconcile_lead_asp"
parsertest "reconcile_new_asp"
parsertest "reconcile_confed"
parsertest "reconcile_start_trans"
parsertest "reconcile_start_trans4"
parsertest "reconcile_start_trans_error"
parsertest "redundantset2"
parsertest "zero-size overflow"
parsertest "zero-size overflow + valid segment"
parsertest "invalid segment type"
for {set i 0} {$i < 10} {incr i 1} { onetest "prepend $i" "" "prepend test $i"; }
for {set i 0} {$i < 5} {incr i 1} { onetest "aggregate $i" "" "aggregate test $i"; }
for {set i 0} {$i < 5} {incr i 1} { onetest "reconcile $i" "" "reconcile test $i"; }
for {set i 0} {$i < 22} {incr i 1} { onetest "compare $i" "" "left cmp "; }
onetest "empty_get" "" "empty_get_test"
attrtest "basic test"
attrtest "length too short"
attrtest "length too long"
attrtest "incorrect flag"
attrtest "as4_path, with as2 format data"
attrtest "as4, with incorrect attr length"
attrtest "basic 4-byte as-path"
attrtest "4b AS_PATH: too short"
attrtest "4b AS_PATH: too long"
attrtest "4b AS_PATH: too long2"
attrtest "4b AS_PATH: bad flags"
attrtest "4b AS4_PATH w/o AS_PATH"
attrtest "4b AS4_PATH: confed"
|