forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add virtual switch mlnx/brcm SAI tests (sonic-net#200)
- Loading branch information
Showing
28 changed files
with
258,119 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SUBDIRS = meta lib vslib syncd saiplayer saidump | ||
SUBDIRS = meta lib vslib syncd saiplayer saidump saidiscovery tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
AM_CPPFLAGS = -I$(top_srcdir)/vslib/inc -I$(top_srcdir)/lib/inc -I$(top_srcdir)/SAI/inc -I$(top_srcdir)/SAI/meta | ||
|
||
bin_PROGRAMS = vssyncd | ||
|
||
if DEBUG | ||
DBGFLAGS = -ggdb -DDEBUG | ||
else | ||
DBGFLAGS = -g | ||
endif | ||
|
||
SAILIB=-L$(top_srcdir)/vslib/src/.libs -lsaivs | ||
|
||
vssyncd_SOURCES = \ | ||
../syncd/syncd.cpp \ | ||
../syncd/syncd_saiswitch.cpp \ | ||
../syncd/syncd_hard_reinit.cpp \ | ||
../syncd/syncd_notifications.cpp \ | ||
../syncd/syncd_counters.cpp \ | ||
../syncd/syncd_applyview.cpp | ||
|
||
vssyncd_CPPFLAGS = $(DBGFLAGS) $(AM_CPPFLAGS) $(CFLAGS_COMMON) $(SAIFLAGS) | ||
vssyncd_LDADD = -lhiredis -lswsscommon $(SAILIB) -lpthread -L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta -ldl | ||
|
||
TESTS = mlnx.pl brcm.pl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,193 @@ | ||
#!/usr/bin/perl | ||
|
||
use strict; | ||
use warnings; | ||
use diagnostics; | ||
|
||
use utils; | ||
|
||
sub test_brcm_start_empty | ||
{ | ||
fresh_start; | ||
|
||
play "empty_sw.rec"; | ||
} | ||
|
||
sub test_brcm_start_empty_to_empty | ||
{ | ||
fresh_start; | ||
|
||
play "empty_sw.rec"; | ||
play "empty_sw.rec"; | ||
} | ||
|
||
sub test_brcm_full | ||
{ | ||
fresh_start; | ||
|
||
play "full.rec"; | ||
} | ||
|
||
sub test_brcm_full_to_empty | ||
{ | ||
fresh_start; | ||
|
||
play "full.rec"; | ||
play "empty_sw.rec"; | ||
} | ||
|
||
sub test_brcm_empty_to_full | ||
{ | ||
fresh_start; | ||
|
||
play "empty_sw.rec"; | ||
play "full.rec"; | ||
} | ||
|
||
sub test_brcm_empty_restart_to_full | ||
{ | ||
fresh_start; | ||
|
||
play "empty_sw.rec"; | ||
|
||
kill_syncd; | ||
start_syncd; | ||
|
||
play "full.rec"; | ||
} | ||
|
||
sub test_brcm_empty_to_full_to_empty_to_full_to_full | ||
{ | ||
fresh_start; | ||
|
||
play "empty_sw.rec"; | ||
play "full.rec"; | ||
play "empty_sw.rec"; | ||
play "full_second.rec"; | ||
play "full_second.rec"; | ||
} | ||
|
||
sub test_brcm_full_to_full | ||
{ | ||
fresh_start; | ||
|
||
play "full.rec"; | ||
play "full_second.rec"; | ||
} | ||
|
||
sub test_brcm_full_to_full_no_bridge | ||
{ | ||
fresh_start; | ||
|
||
play "full.rec"; | ||
play "full_second_no_bridge.rec"; | ||
} | ||
|
||
sub test_brcm_full_to_full_no_bridge_restart | ||
{ | ||
fresh_start; | ||
|
||
play "full.rec"; | ||
play "full_second_no_bridge.rec"; | ||
|
||
kill_syncd; | ||
start_syncd; | ||
|
||
play "full_second_no_bridge.rec"; | ||
} | ||
|
||
sub test_brcm_empty_to_full_to_empty | ||
{ | ||
fresh_start; | ||
|
||
play "empty_sw.rec"; | ||
play "full.rec"; | ||
play "empty_sw.rec"; | ||
} | ||
|
||
sub test_brcm_empty_to_full_nhg_bug | ||
{ | ||
fresh_start; | ||
|
||
play "empty_sw.rec"; | ||
play "full_nhg_bug.rec"; | ||
} | ||
|
||
sub test_brcm_empty_to_full_prio_flow_bug | ||
{ | ||
fresh_start; | ||
|
||
play "empty_sw.rec"; | ||
play "full_nhg_bug_prio_flow_bug.rec"; | ||
} | ||
|
||
sub test_brcm_empty_to_full_trap_group_bug | ||
{ | ||
fresh_start; | ||
|
||
play "empty_sw.rec"; | ||
play "full_nhg_bug_trap_group_create_fail.rec"; | ||
} | ||
|
||
sub test_brcm_queue_bug_null_buffer_profile | ||
{ | ||
fresh_start; | ||
|
||
play "full_queue_bug_null_buffer_profile.rec"; | ||
play "empty_sw.rec"; | ||
} | ||
|
||
sub test_brcm_full_to_empty_no_queue | ||
{ | ||
fresh_start; | ||
|
||
play "full_no_queue.rec"; | ||
play "empty_sw.rec"; | ||
} | ||
|
||
sub test_brcm_full_to_empty_no_queue_no_ipg | ||
{ | ||
fresh_start; | ||
|
||
play "full_no_queue_no_ipg.rec"; | ||
play "empty_sw.rec"; | ||
} | ||
|
||
sub test_brcm_full_to_empty_hostif_remove_segfault | ||
{ | ||
fresh_start; | ||
|
||
play "full_hostif_remove_segfault.rec"; | ||
play "empty_sw.rec"; | ||
} | ||
|
||
sub test_brcm_full_to_empty_no_queue_no_ipg_no_buffer_profile | ||
{ | ||
fresh_start; | ||
|
||
play "full_no_queue_no_ipg_no_buffer_pfofile.rec"; | ||
play "empty_sw.rec"; | ||
} | ||
|
||
|
||
# RUN TESTS | ||
|
||
test_brcm_start_empty; | ||
test_brcm_start_empty_to_empty; | ||
test_brcm_full; | ||
test_brcm_full_to_empty; | ||
test_brcm_empty_to_full; | ||
test_brcm_empty_restart_to_full; | ||
test_brcm_empty_to_full_to_empty_to_full_to_full; | ||
test_brcm_full_to_full; | ||
test_brcm_full_to_full_no_bridge; | ||
test_brcm_full_to_full_no_bridge_restart; | ||
test_brcm_empty_to_full_to_empty; | ||
test_brcm_empty_to_full_nhg_bug; | ||
test_brcm_empty_to_full_prio_flow_bug; | ||
test_brcm_empty_to_full_trap_group_bug; | ||
test_brcm_queue_bug_null_buffer_profile; | ||
test_brcm_full_to_empty_no_queue; | ||
test_brcm_full_to_empty_no_queue_no_ipg; | ||
test_brcm_full_to_empty_hostif_remove_segfault; | ||
test_brcm_full_to_empty_no_queue_no_ipg_no_buffer_profile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
2017-05-13.20:47:13.432144|#|recording to: sairedis.2017-05-13.20:47:13.431964.rec | ||
2017-05-13.20:47:13.435733|a|INIT_VIEW | ||
2017-05-13.20:47:13.439887|A|SAI_STATUS_SUCCESS | ||
2017-05-13.20:47:13.443079|c|SAI_OBJECT_TYPE_SWITCH:oid:0x21000000000000|SAI_SWITCH_ATTR_INIT_SWITCH=true | ||
2017-06-14.01:55:46.558259|s|SAI_OBJECT_TYPE_SWITCH:oid:0x21000000000000|SAI_SWITCH_ATTR_SRC_MAC_ADDRESS=00:11:11:11:11:11 | ||
2017-05-13.20:47:24.881973|a|APPLY_VIEW | ||
2017-05-13.20:47:24.883499|A|SAI_STATUS_SUCCESS |
Oops, something went wrong.