Skip to content

Commit 3e1814f

Browse files
Merge pull request #215 from intel-go/dkolistr/test_fix
Fixes in tests
2 parents 15626c9 + 870edc8 commit 3e1814f

File tree

3 files changed

+36
-45
lines changed

3 files changed

+36
-45
lines changed

Diff for: test/framework/main/stability.json

+24-24
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@
1818
"test-type": "TestTypeScenario",
1919
"test-apps": [
2020
{
21-
"image-name": "nff-go-test1",
21+
"image-name": "nff-go-test-resend",
2222
"app-type": "TestAppGo",
2323
"exec-cmd": [
24-
"./testResend", "-testScenario=1"
24+
"./testResend", "-testScenario=1", "-inport=1", "-outport=1"
2525
]
2626
},
2727
{
28-
"image-name": "nff-go-test1",
28+
"image-name": "nff-go-test-resend",
2929
"app-type": "TestAppGo",
3030
"exec-cmd": [
31-
"./testResend", "-testScenario=2"
31+
"./testResend", "-testScenario=2", "-inport=0", "-outport=0"
3232
]
3333
}
3434
]
@@ -42,14 +42,14 @@
4242
"image-name": "nff-go-test-merge",
4343
"app-type": "TestAppGo",
4444
"exec-cmd": [
45-
"./testMerge", "-testScenario=1"
45+
"./testMerge", "-testScenario=1", "-inport1=1", "-outport1=1", "-outport2=0"
4646
]
4747
},
4848
{
4949
"image-name": "nff-go-test-merge",
5050
"app-type": "TestAppGo",
5151
"exec-cmd": [
52-
"./testMerge", "-testScenario=2"
52+
"./testMerge", "-testScenario=2", "-inport1=0", "-inport2=1", "-outport1=0"
5353
]
5454
}
5555
]
@@ -63,14 +63,14 @@
6363
"image-name": "nff-go-test-split",
6464
"app-type": "TestAppGo",
6565
"exec-cmd": [
66-
"./testSplit", "-testScenario=1"
66+
"./testSplit", "-testScenario=1", "-inport1=1", "-outport1=0", "-inport2=0"
6767
]
6868
},
6969
{
7070
"image-name": "nff-go-test-split",
7171
"app-type": "TestAppGo",
7272
"exec-cmd": [
73-
"./testSplit", "-testScenario=2"
73+
"./testSplit", "-testScenario=2", "-inport1=1", "-outport1=0", "-outport2=1"
7474
]
7575
}
7676
]
@@ -84,14 +84,14 @@
8484
"image-name": "nff-go-test-separate",
8585
"app-type": "TestAppGo",
8686
"exec-cmd": [
87-
"./testSeparate", "-testScenario=1"
87+
"./testSeparate", "-testScenario=1", "-inport1=1", "-outport1=1", "-inport2=0"
8888
]
8989
},
9090
{
9191
"image-name": "nff-go-test-separate",
9292
"app-type": "TestAppGo",
9393
"exec-cmd": [
94-
"./testSeparate", "-testScenario=2"
94+
"./testSeparate", "-testScenario=2", "-inport1=0", "-outport1=0", "-outport2=1"
9595
]
9696
}
9797
]
@@ -105,14 +105,14 @@
105105
"image-name": "nff-go-test-partition",
106106
"app-type": "TestAppGo",
107107
"exec-cmd": [
108-
"./testPartition", "-testScenario=1"
108+
"./testPartition", "-testScenario=1", "-inport1=1", "-outport1=1", "-inport2=0"
109109
]
110110
},
111111
{
112112
"image-name": "nff-go-test-partition",
113113
"app-type": "TestAppGo",
114114
"exec-cmd": [
115-
"./testPartition", "-testScenario=2"
115+
"./testPartition", "-testScenario=2", "-inport1=0", "-outport1=0", "-outport2=1"
116116
]
117117
}
118118
]
@@ -123,17 +123,17 @@
123123
"test-type": "TestTypeScenario",
124124
"test-apps": [
125125
{
126-
"image-name": "nff-go-test-handle2",
126+
"image-name": "nff-go-test-handle",
127127
"app-type": "TestAppGo",
128128
"exec-cmd": [
129-
"./testHandle", "-testScenario=1"
129+
"./testHandle", "-testScenario=1", "-inport=1", "-outport=1"
130130
]
131131
},
132132
{
133-
"image-name": "nff-go-test-handle2",
133+
"image-name": "nff-go-test-handle",
134134
"app-type": "TestAppGo",
135135
"exec-cmd": [
136-
"./testHandle", "-testScenario=2"
136+
"./testHandle", "-testScenario=2", "-inport=0", "-outport=0"
137137
]
138138
}
139139
]
@@ -147,14 +147,14 @@
147147
"image-name": "nff-go-test-cksum",
148148
"app-type": "TestAppGo",
149149
"exec-cmd": [
150-
"./testCksum", "-testScenario=2", "-hwol"
150+
"./testCksum", "-testScenario=2", "-hwol", "-inport=1", "-outport=1"
151151
]
152152
},
153153
{
154154
"image-name": "nff-go-test-cksum",
155155
"app-type": "TestAppGo",
156156
"exec-cmd": [
157-
"./testCksum", "-testScenario=1", "-ipv4", "-tcp", "-number=10000"
157+
"./testCksum", "-testScenario=1", "-ipv4", "-tcp", "-number=10000", "-inport=0", "-outport=0"
158158
]
159159
}
160160
]
@@ -168,14 +168,14 @@
168168
"image-name": "nff-go-test-cksum",
169169
"app-type": "TestAppGo",
170170
"exec-cmd": [
171-
"./testCksum", "-testScenario=2", "-hwol"
171+
"./testCksum", "-testScenario=2", "-hwol", "-inport=1", "-outport=1"
172172
]
173173
},
174174
{
175175
"image-name": "nff-go-test-cksum",
176176
"app-type": "TestAppGo",
177177
"exec-cmd": [
178-
"./testCksum", "-testScenario=1", "-ipv4", "-udp", "-number=10000"
178+
"./testCksum", "-testScenario=1", "-ipv4", "-udp", "-number=10000", "-inport=0", "-outport=0"
179179
]
180180
}
181181
]
@@ -189,14 +189,14 @@
189189
"image-name": "nff-go-test-cksum",
190190
"app-type": "TestAppGo",
191191
"exec-cmd": [
192-
"./testCksum", "-testScenario=2", "-hwol"
192+
"./testCksum", "-testScenario=2", "-hwol", "-inport=1", "-outport=1"
193193
]
194194
},
195195
{
196196
"image-name": "nff-go-test-cksum",
197197
"app-type": "TestAppGo",
198198
"exec-cmd": [
199-
"./testCksum", "-testScenario=1", "-ipv6", "-tcp", "-number=10000"
199+
"./testCksum", "-testScenario=1", "-ipv6", "-tcp", "-number=10000", "-inport=0", "-outport=0"
200200
]
201201
}
202202
]
@@ -210,14 +210,14 @@
210210
"image-name": "nff-go-test-cksum",
211211
"app-type": "TestAppGo",
212212
"exec-cmd": [
213-
"./testCksum", "-testScenario=2", "-hwol"
213+
"./testCksum", "-testScenario=2", "-hwol", "-inport=1", "-outport=1"
214214
]
215215
},
216216
{
217217
"image-name": "nff-go-test-cksum",
218218
"app-type": "TestAppGo",
219219
"exec-cmd": [
220-
"./testCksum", "-testScenario=1", "-ipv6", "-udp", "-number=10000"
220+
"./testCksum", "-testScenario=1", "-ipv6", "-udp", "-number=10000", "-inport=0", "-outport=0"
221221
]
222222
}
223223
]

Diff for: test/framework/main/stability_VM.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@
1818
"test-type": "TestTypeScenario",
1919
"test-apps": [
2020
{
21-
"image-name": "nff-go-test1",
21+
"image-name": "nff-go-test-resend",
2222
"app-type": "TestAppGo",
2323
"exec-cmd": [
24-
"./testResend", "-testScenario=1", "-number=10000", "-config=config.json", "-target=hostname2", "-speed=1000"
24+
"./testResend", "-testScenario=1", "-number=10000", "-config=config.json", "-target=hostname2", "-speed=1000", "-inport=1", "-outport=1"
2525
]
2626
},
2727
{
28-
"image-name": "nff-go-test1",
28+
"image-name": "nff-go-test-resend",
2929
"app-type": "TestAppGo",
3030
"exec-cmd": [
31-
"./testResend", "-testScenario=2", "-config=config.json", "-target=hostname1"
31+
"./testResend", "-testScenario=2", "-config=config.json", "-target=hostname1", "-inport=0", "-outport=0"
3232
]
3333
}
3434
]
@@ -42,14 +42,14 @@
4242
"image-name": "nff-go-test-merge",
4343
"app-type": "TestAppGo",
4444
"exec-cmd": [
45-
"./testMerge", "-testScenario=1", "-number=10000", "-config=config.json", "-target=hostname2", "-speed=1000"
45+
"./testMerge", "-testScenario=1", "-number=10000", "-config=config.json", "-target=hostname2", "-speed=1000", "-inport1=1", "-outport1=1", "-outport2=0"
4646
]
4747
},
4848
{
4949
"image-name": "nff-go-test-merge",
5050
"app-type": "TestAppGo",
5151
"exec-cmd": [
52-
"./testMerge", "-testScenario=2", "-config=config.json", "-target=hostname1"
52+
"./testMerge", "-testScenario=2", "-config=config.json", "-target=hostname1", "-inport1=0", "-inport2=1", "-outport1=0"
5353
]
5454
}
5555
]
@@ -63,14 +63,14 @@
6363
"image-name": "nff-go-test-split",
6464
"app-type": "TestAppGo",
6565
"exec-cmd": [
66-
"./testSplit", "-testScenario=1", "-number=10000", "-config=config.json", "-target=hostname2", "-speed=1000"
66+
"./testSplit", "-testScenario=1", "-number=10000", "-config=config.json", "-target=hostname2", "-speed=1000", "-inport1=1", "-outport1=0", "-inport2=0"
6767
]
6868
},
6969
{
7070
"image-name": "nff-go-test-split",
7171
"app-type": "TestAppGo",
7272
"exec-cmd": [
73-
"./testSplit", "-testScenario=2", "-config=config.json", "-target=hostname1"
73+
"./testSplit", "-testScenario=2", "-config=config.json", "-target=hostname1", "-inport1=1", "-outport1=0", "-outport2=1"
7474
]
7575
}
7676
]
@@ -84,14 +84,14 @@
8484
"image-name": "nff-go-test-separate",
8585
"app-type": "TestAppGo",
8686
"exec-cmd": [
87-
"./testSeparate", "-testScenario=1", "-number=10000", "-config=config.json", "-target=hostname2", "-speed=1000"
87+
"./testSeparate", "-testScenario=1", "-number=10000", "-config=config.json", "-target=hostname2", "-speed=1000", "-inport1=1", "-outport1=1", "-inport2=0"
8888
]
8989
},
9090
{
9191
"image-name": "nff-go-test-separate",
9292
"app-type": "TestAppGo",
9393
"exec-cmd": [
94-
"./testSeparate", "-testScenario=2", "-config=config.json", "-target=hostname1"
94+
"./testSeparate", "-testScenario=2", "-config=config.json", "-target=hostname1", "-inport1=0", "-outport1=0", "-outport2=1"
9595
]
9696
}
9797
]
@@ -105,14 +105,14 @@
105105
"image-name": "nff-go-test-partition",
106106
"app-type": "TestAppGo",
107107
"exec-cmd": [
108-
"./testPartition", "-testScenario=1", "-number=10000", "-config=config.json", "-target=hostname2", "-speed=1000"
108+
"./testPartition", "-testScenario=1", "-number=10000", "-config=config.json", "-target=hostname2", "-speed=1000", "-inport1=1", "-outport1=1", "-inport2=0"
109109
]
110110
},
111111
{
112112
"image-name": "nff-go-test-partition",
113113
"app-type": "TestAppGo",
114114
"exec-cmd": [
115-
"./testPartition", "-testScenario=2", "-config=config.json", "-target=hostname1"
115+
"./testPartition", "-testScenario=2", "-config=config.json", "-target=hostname1", "-inport1=0", "-outport1=0", "-outport2=1"
116116
]
117117
}
118118
]

Diff for: test/stability/testCksum/testCksum.go

-9
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
"os"
1313
"sync"
1414
"sync/atomic"
15-
"time"
1615
"unsafe"
1716

1817
"github.com/intel-go/nff-go/common"
@@ -278,14 +277,6 @@ func generatePacket(emptyPacket *packet.Packet, context flow.UserContext) {
278277
}
279278
}
280279

281-
curValue := atomic.LoadUint64(&sentPackets)
282-
283-
if curValue >= totalPackets {
284-
testDoneEvent.Signal()
285-
// Stop sending packets, let program finish.
286-
time.Sleep(2 * time.Second)
287-
}
288-
289280
atomic.AddUint64(&sentPackets, 1)
290281
}
291282

0 commit comments

Comments
 (0)