Add unit tests for pkg/ovs/openflow#4221
Conversation
d8ab2d7 to
a5a902f
Compare
Codecov Report
@@ Coverage Diff @@
## main #4221 +/- ##
==========================================
- Coverage 73.77% 69.80% -3.98%
==========================================
Files 410 402 -8
Lines 60966 58384 -2582
==========================================
- Hits 44978 40754 -4224
- Misses 13082 14862 +1780
+ Partials 2906 2768 -138
*This pull request uses carry forward flags. Click here to find out more.
|
a5a902f to
6b3d255
Compare
c0af2c5 to
4274e52
Compare
7f12440 to
d928d9e
Compare
|
This PR depends on #4258. |
c2f254f to
73b3334
Compare
f4feb52 to
8dea3e1
Compare
ff315c8 to
6e9d460
Compare
295ab33 to
5344de4
Compare
0c7d665 to
97dccca
Compare
97dccca to
9f4687b
Compare
9f4687b to
866b88d
Compare
luolanzone
left a comment
There was a problem hiding this comment.
LGTM overall, a few nits.
| if isMatch { | ||
| dstFieldStr := getFieldNameString(spec.DstField.Field.Class, spec.DstField.Field.Field, spec.DstField.Ofs, nBits, true, false) | ||
| var dstFieldStr string | ||
| if spec.DstField.Field.Class == openflow15.OXM_CLASS_NXM_1 { |
There was a problem hiding this comment.
Can you explain a little bit why this change is needed? A new class is introduced after openflow15?
There was a problem hiding this comment.
In the OpenFlow learn flow action, the registers in OpenFlow 1.5 (OXM_CLASS_NXM_1) are capitalized when used as an output.
wenyingd
left a comment
There was a problem hiding this comment.
Overall LGTM, one general comment is I saw many cases are almost the same except for the data value, maybe no need to add such duplicated cases?
| Value: &openflow15.ByteArrayField{Data: []byte{0x12, 0x34, 0x56}, Length: 3}, | ||
| }, | ||
| }, | ||
| { |
There was a problem hiding this comment.
I don't get the differences among the three cases except for the data. Are they all needed?
There was a problem hiding this comment.
Just to test different values. Besides, this can be also to test if the match string is as expected. For example, the first case should be xxreg0=0x123456, not xxreg0=0x00123456
866b88d to
045a711
Compare
045a711 to
55ff6b1
Compare
|
/test-all |
55ff6b1 to
e1c95fb
Compare
Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
e1c95fb to
25b496b
Compare
luolanzone
left a comment
There was a problem hiding this comment.
LGTM overall, a few nits for error check.
|
Thanks for merging and reviewing this PR @tnqn @luolanzone @wenyingd |
Signed-off-by: Hongliang Liu lhongliang@vmware.com