-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[test] Adding Broadcom configuration file test #1611
Conversation
In order to allow SONiC community to check in Broadcom configuration file directly under device folder. We need to add this test to make sure the contents of the configuration is compliant with Broadcom specifications.
src/sonic-device-data/src/Makefile
Outdated
test: | ||
# Execute Broadcom config file test | ||
pushd ../tests/ | ||
for f in `find ../../../device -name "*.config.bcm"`; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest replacing deprecated backticks with $()
syntax: for f in $(find ../../../device -name "*.config.bcm"); do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aye Aye sir!
@@ -0,0 +1,11 @@ | |||
.ONESHELL: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.ONESHELL is not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, oneshell is needed in order to use bash, as this test depends on bash syntax.
* [test] Adding Broadcom configuration file test In order to allow SONiC community to check in Broadcom configuration file directly under device folder. We need to add this test to make sure the contents of the configuration is compliant with Broadcom specifications. * Invoke test from Debian package builder * Use $() syntax * Remove the debug echo statement
Update sonic-sairedis submodule and also update sonic-swss submodule as there are interdependent changes. * src/sonic-sairedis 13474d1...bc58b0f (12): > Add gbsyncdmgrd; deprecate gbsyncd_startup.py (#809) > Remove gbsyncd_start.sh (#808) > [gbsyncd] Fix shebang in gbsyncd_startup.py; Make script executable (#807) > [saiasiccmp] Add saiasiccmp tool to compare 2 asic views (#791) > [configure] Add -Wno-psabi to remove "passing argument changed in GCC 7.1" (#799) > Update FlexCounter.cpp, use m_pollInterval in MUTEX lock (#797) > [vs] Add special warm boot logic to populate default attributes (#796) > [ci]: add vstest (#795) > [tests] Add macsec unittest (#782) > [debian/control] libsairedis-dev depends on libzmq5-dev (#794) > [ci]: use build template (#793) > Rename duplicate file name (#773) * src/sonic-swss 0b0d24c...5adb73e (47): > Initialize system port type variable (#1681) > [Dynamic Buffer Calc] Enhance the field checking in table handling (#1680) > Handle the clear request for 'Q_SHARED_ALL' (#1653) > [MuxOrch] FDB ageout safety check (#1674) > Deactivate mirror session only when session status is true in updateLagMember (#1666) > Revert "[buffermgr] Support maximum port headroom checking (#1607)" (#1675) > reduce severity of log to info in case of flush on non-existing member (#1669) > Revert "[Dynamic buffer calc] Bug fix: Remove PGs from an administratively down port. (#1652)" (#1676) > [Dynamic buffer calc] Bug fix: Remove PGs from an administratively down port. (#1652) > [acl] Move ACL table constants to acltable.h (#1671) > [nbrmgrd] added function to parse IP address from APP_DB (#1672) > [MUX/PFCWD] Use in_ports for acls instead of seperate ACL table (#1670) > [vog/systemlag] Voq lagid allocator (#1603) > Add table descriptions for dynamic buffer calculation to the documents (#1664) > [vstest/subintf] Add vs test case to validate processing sequence of APPL DB keys (#1663) > Remove vxlanmgrd dependency on orchagent (#1647) > Keep attribute order in bulk mode (#1659) > [mux] VS test for neigh, route and fdb (#1656) > [linksync] Netdev oper status determination using IFF_RUNNING (#1568) > [portorch] parse on/off value from autoneg (#1658) > [intfsorch] Create subport with the entry contains necessary attributes (#1650) > [ci]: Purge swss before install (#1654) > Update StateDB with error if state change failed, Update APP_DB in all state chg req (#1662) > Added changes to handle dependency check in FdbSyncd and FpmSyncd for warm-boot (#1556) > [synchronous mode] Add failure notification for SAI failures in synchronous mode (#1596) > [acl] Enable VLAN ID qualifier for ACL rules (#1648) > Updated PFCWD to use single ACL table for PFCWD and MUX (#1620) > [orchagent] Increase SAI REDIS response timeout to support FW upgrade during init (Mellanox only). (#1637) > [vstest/nhg]: use dvs_route fixture to make test_nhg more robust > [vstest]: add dvs_route fixture > [vstest/subintf] Update vs tests to validate physical port host interface vlan tag attribute (#1634) > Remove useless header in macsecorch (#1628) > Add SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS counter, create new FlexCounter group (#1600) > fixed unsupported resource issue (#1641) > [test_virtual_chassis]: use wait_for to make test more robust (#1640) > spell check fixes (#1630) > [bufferorch] Handle NOT IMPLEMENTED status returned during set attr operation (#1639) > [ci]: run vstest > [test_virtual_chassis]: use wait_for function to improve test robustness > [Mux] Neighbor handling based on FDB entry (#1631) > [ci]: use build template (#1633) > Log level change from ERR to INFO for fetch systemports issue (#1632) > Migrate serdes programming to port serdes object (#1611) > [tests] Remove legacy saiattributelist.h dependency (#1608) > [buffermgr] Support maximum port headroom checking (#1607) > Support shared headroom pool on top of dynamic buffer calculation (#1581) > Fix the compiling errors in gcc9 (#1621)
Update sonic-sairedis submodule and also update sonic-swss submodule as there are interdependent changes. * src/sonic-sairedis 13474d1...bc58b0f (12): > Add gbsyncdmgrd; deprecate gbsyncd_startup.py (sonic-net#809) > Remove gbsyncd_start.sh (sonic-net#808) > [gbsyncd] Fix shebang in gbsyncd_startup.py; Make script executable (sonic-net#807) > [saiasiccmp] Add saiasiccmp tool to compare 2 asic views (sonic-net#791) > [configure] Add -Wno-psabi to remove "passing argument changed in GCC 7.1" (sonic-net#799) > Update FlexCounter.cpp, use m_pollInterval in MUTEX lock (sonic-net#797) > [vs] Add special warm boot logic to populate default attributes (sonic-net#796) > [ci]: add vstest (sonic-net#795) > [tests] Add macsec unittest (sonic-net#782) > [debian/control] libsairedis-dev depends on libzmq5-dev (sonic-net#794) > [ci]: use build template (sonic-net#793) > Rename duplicate file name (sonic-net#773) * src/sonic-swss 0b0d24c...5adb73e (47): > Initialize system port type variable (sonic-net#1681) > [Dynamic Buffer Calc] Enhance the field checking in table handling (sonic-net#1680) > Handle the clear request for 'Q_SHARED_ALL' (sonic-net#1653) > [MuxOrch] FDB ageout safety check (sonic-net#1674) > Deactivate mirror session only when session status is true in updateLagMember (sonic-net#1666) > Revert "[buffermgr] Support maximum port headroom checking (sonic-net#1607)" (sonic-net#1675) > reduce severity of log to info in case of flush on non-existing member (sonic-net#1669) > Revert "[Dynamic buffer calc] Bug fix: Remove PGs from an administratively down port. (sonic-net#1652)" (sonic-net#1676) > [Dynamic buffer calc] Bug fix: Remove PGs from an administratively down port. (sonic-net#1652) > [acl] Move ACL table constants to acltable.h (sonic-net#1671) > [nbrmgrd] added function to parse IP address from APP_DB (sonic-net#1672) > [MUX/PFCWD] Use in_ports for acls instead of seperate ACL table (sonic-net#1670) > [vog/systemlag] Voq lagid allocator (sonic-net#1603) > Add table descriptions for dynamic buffer calculation to the documents (sonic-net#1664) > [vstest/subintf] Add vs test case to validate processing sequence of APPL DB keys (sonic-net#1663) > Remove vxlanmgrd dependency on orchagent (sonic-net#1647) > Keep attribute order in bulk mode (sonic-net#1659) > [mux] VS test for neigh, route and fdb (sonic-net#1656) > [linksync] Netdev oper status determination using IFF_RUNNING (sonic-net#1568) > [portorch] parse on/off value from autoneg (sonic-net#1658) > [intfsorch] Create subport with the entry contains necessary attributes (sonic-net#1650) > [ci]: Purge swss before install (sonic-net#1654) > Update StateDB with error if state change failed, Update APP_DB in all state chg req (sonic-net#1662) > Added changes to handle dependency check in FdbSyncd and FpmSyncd for warm-boot (sonic-net#1556) > [synchronous mode] Add failure notification for SAI failures in synchronous mode (sonic-net#1596) > [acl] Enable VLAN ID qualifier for ACL rules (sonic-net#1648) > Updated PFCWD to use single ACL table for PFCWD and MUX (sonic-net#1620) > [orchagent] Increase SAI REDIS response timeout to support FW upgrade during init (Mellanox only). (sonic-net#1637) > [vstest/nhg]: use dvs_route fixture to make test_nhg more robust > [vstest]: add dvs_route fixture > [vstest/subintf] Update vs tests to validate physical port host interface vlan tag attribute (sonic-net#1634) > Remove useless header in macsecorch (sonic-net#1628) > Add SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS counter, create new FlexCounter group (sonic-net#1600) > fixed unsupported resource issue (sonic-net#1641) > [test_virtual_chassis]: use wait_for to make test more robust (sonic-net#1640) > spell check fixes (sonic-net#1630) > [bufferorch] Handle NOT IMPLEMENTED status returned during set attr operation (sonic-net#1639) > [ci]: run vstest > [test_virtual_chassis]: use wait_for function to improve test robustness > [Mux] Neighbor handling based on FDB entry (sonic-net#1631) > [ci]: use build template (sonic-net#1633) > Log level change from ERR to INFO for fetch systemports issue (sonic-net#1632) > Migrate serdes programming to port serdes object (sonic-net#1611) > [tests] Remove legacy saiattributelist.h dependency (sonic-net#1608) > [buffermgr] Support maximum port headroom checking (sonic-net#1607) > Support shared headroom pool on top of dynamic buffer calculation (sonic-net#1581) > Fix the compiling errors in gcc9 (sonic-net#1621)
Update sonic-sairedis submodule and also update sonic-swss submodule as there are interdependent changes. * src/sonic-sairedis 13474d1...bc58b0f (12): > Add gbsyncdmgrd; deprecate gbsyncd_startup.py (sonic-net#809) > Remove gbsyncd_start.sh (sonic-net#808) > [gbsyncd] Fix shebang in gbsyncd_startup.py; Make script executable (sonic-net#807) > [saiasiccmp] Add saiasiccmp tool to compare 2 asic views (sonic-net#791) > [configure] Add -Wno-psabi to remove "passing argument changed in GCC 7.1" (sonic-net#799) > Update FlexCounter.cpp, use m_pollInterval in MUTEX lock (sonic-net#797) > [vs] Add special warm boot logic to populate default attributes (sonic-net#796) > [ci]: add vstest (sonic-net#795) > [tests] Add macsec unittest (sonic-net#782) > [debian/control] libsairedis-dev depends on libzmq5-dev (sonic-net#794) > [ci]: use build template (sonic-net#793) > Rename duplicate file name (sonic-net#773) * src/sonic-swss 0b0d24c...5adb73e (47): > Initialize system port type variable (sonic-net#1681) > [Dynamic Buffer Calc] Enhance the field checking in table handling (sonic-net#1680) > Handle the clear request for 'Q_SHARED_ALL' (sonic-net#1653) > [MuxOrch] FDB ageout safety check (sonic-net#1674) > Deactivate mirror session only when session status is true in updateLagMember (sonic-net#1666) > Revert "[buffermgr] Support maximum port headroom checking (sonic-net#1607)" (sonic-net#1675) > reduce severity of log to info in case of flush on non-existing member (sonic-net#1669) > Revert "[Dynamic buffer calc] Bug fix: Remove PGs from an administratively down port. (sonic-net#1652)" (sonic-net#1676) > [Dynamic buffer calc] Bug fix: Remove PGs from an administratively down port. (sonic-net#1652) > [acl] Move ACL table constants to acltable.h (sonic-net#1671) > [nbrmgrd] added function to parse IP address from APP_DB (sonic-net#1672) > [MUX/PFCWD] Use in_ports for acls instead of seperate ACL table (sonic-net#1670) > [vog/systemlag] Voq lagid allocator (sonic-net#1603) > Add table descriptions for dynamic buffer calculation to the documents (sonic-net#1664) > [vstest/subintf] Add vs test case to validate processing sequence of APPL DB keys (sonic-net#1663) > Remove vxlanmgrd dependency on orchagent (sonic-net#1647) > Keep attribute order in bulk mode (sonic-net#1659) > [mux] VS test for neigh, route and fdb (sonic-net#1656) > [linksync] Netdev oper status determination using IFF_RUNNING (sonic-net#1568) > [portorch] parse on/off value from autoneg (sonic-net#1658) > [intfsorch] Create subport with the entry contains necessary attributes (sonic-net#1650) > [ci]: Purge swss before install (sonic-net#1654) > Update StateDB with error if state change failed, Update APP_DB in all state chg req (sonic-net#1662) > Added changes to handle dependency check in FdbSyncd and FpmSyncd for warm-boot (sonic-net#1556) > [synchronous mode] Add failure notification for SAI failures in synchronous mode (sonic-net#1596) > [acl] Enable VLAN ID qualifier for ACL rules (sonic-net#1648) > Updated PFCWD to use single ACL table for PFCWD and MUX (sonic-net#1620) > [orchagent] Increase SAI REDIS response timeout to support FW upgrade during init (Mellanox only). (sonic-net#1637) > [vstest/nhg]: use dvs_route fixture to make test_nhg more robust > [vstest]: add dvs_route fixture > [vstest/subintf] Update vs tests to validate physical port host interface vlan tag attribute (sonic-net#1634) > Remove useless header in macsecorch (sonic-net#1628) > Add SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS counter, create new FlexCounter group (sonic-net#1600) > fixed unsupported resource issue (sonic-net#1641) > [test_virtual_chassis]: use wait_for to make test more robust (sonic-net#1640) > spell check fixes (sonic-net#1630) > [bufferorch] Handle NOT IMPLEMENTED status returned during set attr operation (sonic-net#1639) > [ci]: run vstest > [test_virtual_chassis]: use wait_for function to improve test robustness > [Mux] Neighbor handling based on FDB entry (sonic-net#1631) > [ci]: use build template (sonic-net#1633) > Log level change from ERR to INFO for fetch systemports issue (sonic-net#1632) > Migrate serdes programming to port serdes object (sonic-net#1611) > [tests] Remove legacy saiattributelist.h dependency (sonic-net#1608) > [buffermgr] Support maximum port headroom checking (sonic-net#1607) > Support shared headroom pool on top of dynamic buffer calculation (sonic-net#1581) > Fix the compiling errors in gcc9 (sonic-net#1621)
Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com> 30f5dd6 Update the example for pfcwd start command (sonic-net#1984) 9e30871 [Auto Techsupport] Event driven Techsupport Bug Fixes (sonic-net#1986) fbd565d Fix wrong help message for cable length setting (sonic-net#1978) b3a5052 [GCU] Using simulated config instead of target config when validating replace operation in NoDependencyMoveValidator (sonic-net#1987) 35cb524 [GCU] Copying config_db before callding sonic_yang.loadData (sonic-net#1983) a98858d [GCU] Different apply-patch runs should produce same sorted steps (sonic-net#1988) 8c81ae3 [breakout] Fix the check when port is not present in BREAKOUT_CFG table (sonic-net#1765) bc8fe7c [doc][DPB] Update DPB related interface breakout command Info (sonic-net#1438) 1a2a9a3 [config] Fix 'config reload -l' command to get filename by default (sonic-net#1611) ed2fa69 [debug dump util] FDB debug dump util changes (sonic-net#1968) 3b642c9 [GCU] Loading yang-models only once (sonic-net#1981) bb56fc2 Update swss_ready check to check per namespace swss service (sonic-net#1974) 4f39f9f [GCU] Moving PatchSorter unit-test to json file to make it easier to read/maintain (sonic-net#1977) 1a75870 [CLI][Help string] Changed the show command help text to be more consistent with each other. 818dcbf [GCU] Implementing DryRun by printing patch-sorter steps/imitating config_db (sonic-net#1973)
4236bc4 [config reload] Fixing config reload when timer based delayed services are disabled (#1967) d2514e4 [GCU] Different apply-patch runs should produce same sorted steps (#1988) 2878adb [GCU] Using simulated config instead of target config when validating replace operation in NoDependencyMoveValidator (#1987) fb8ca98 [GCU] Loading yang-models only once (#1981) f88ee92 [GCU] Copying config_db before callding sonic_yang.loadData (#1983) 9ed0e91 [GCU] Implementing DryRun by printing patch-sorter steps/imitating config_db (#1973) b36b5e3 [GCU] Moving PatchSorter unit-test to json file to make it easier to read/maintain (#1977) c0fa28b [generic-config-updater] Improving CreateOnly validator and marking /LOOPBACK_INTERFACE/LOOPBACK#/vrf_name as create-only (#1969) 0559d04 [generic-config-updater] Adding non-strict mode (#1929) b07f477 [debug dump util] FDB debug dump util changes (#1968) 6d8757a [warm/fast-reboot] Fix kexec portion to support platforms based on Device Tree (#1966) cc1409e [Auto Techsupport] Event driven Techsupport Bug Fixes (#1986) 6c48bd5 Fix wrong help message for cable length setting (#1978) c0bbbe3 [breakout] Fix the check when port is not present in BREAKOUT_CFG table (#1765) 5bb8cad [doc][DPB] Update DPB related interface breakout command Info (#1438) e6fd990 [config] Fix 'config reload -l' command to get filename by default (#1611) bd8f7bb Update swss_ready check to check per namespace swss service (#1974) 5439f94 [soft-reboot] Add support for platforms based on Device Tree (#1963) 7c5810a [config] Add portchannel support for static route (#1857) 7cb6a1b preserve old order for config reload (#1964) 20bddbd [Auto-Techsupport] Issues related to Multiple Cores crashing handled (#1948)
Co-authored-by: dgsudharsan <sudharsan_gopalarat@dell.com>
Changes: [config] Fix 'config reload -l' command to get filename by default (sonic-net#1611) Signed-off-by: Praveen Chaudhary <pchaudhary@linkedin.com>
…onic-net#1611) Fix sonic-net#7433 Right now config reload -l is getting failed due to an error. I guess the problem is here in sonic-utilities repo. If user does not provide filename with config reload -l, command = "{} -j {} -v DEVICE_METADATA.localhost.hwsku".format(SONIC_CFGGEN_PATH, filename) will not provide cfg_hwsku i.e. hwsku parameter as it should which will later cause problem here command = "{} -H -k {} --write-to-db".format(SONIC_CFGGEN_PATH, cfg_hwsku) as hwsku is not available around that time. that's why we notice errors like No such file or directory: 'None' as pasted in this issue. - How I did it To Fix the issue, moved the part where the code gets cfg_hwsku command = "{} -j {} -v DEVICE_METADATA.localhost.hwsku".format(SONIC_CFGGEN_PATH, file) to the same location it needed as we get filename by default. - How to verify it 'sudo config reload -l' Added test cases. Signed-off-by: Sangita Maity <samaity@linkedin.com>
- What I did
In order to allow SONiC community to check in Broadcom configuration
file directly under device folder. We need to add this test to make
sure the contents of the configuration is compliant with Broadcom
specifications.
Added one config.bcm for Arista7260cx3 as example and also for positive test.
- How to verify it
With the change as-is, build passes, the built image executed on the target platform, the configuration was applied properly.
With following contents in following file:
localadmin@yingxie-vm0:~/src/sonic-buffers$ cat device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/test-must-fail.config.bcm
invalid_entry=invalid_value
Build hit following failure:
/sonic/src/sonic-device-data/tests /sonic/src/sonic-device-data/src
./config_checker ../../../device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/th2-a7260cx3-64-112x50G+8x100G.config.bcm
Result: ../../../device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/th2-a7260cx3-64-112x50G+8x100G.config.bcm PASSED the config check!
./config_checker ../../../device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/test-must-fail.config.bcm
[line 1] Error: invalid_entry is not permitted
Result: ../../../device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/test-must-fail.config.bcm FAILED the config check!
Makefile:6: recipe for target 'test' failed
make[3]: *** [test] Error 255
make[3]: Leaving directory '/sonic/src/sonic-device-data/src'
dh_auto_build: make -j1 returned exit code 2
debian/rules:6: recipe for target 'build' failed
make[2]: *** [build] Error 2
make[2]: Leaving directory '/sonic/src/sonic-device-data/src'
dpkg-buildpackage: error: debian/rules build gave error exit status 2
Makefile:8: recipe for target '/sonic/target/debs/sonic-device-data_1.0-1_all.deb' failed
make[1]: *** [/sonic/target/debs/sonic-device-data_1.0-1_all.deb] Error 2
make[1]: Leaving directory '/sonic/src/sonic-device-data'
[ FAIL LOG END ] [ target/debs/sonic-device-data_1.0-1_all.deb ]
slave.mk:194: recipe for target 'target/debs/sonic-device-data_1.0-1_all.deb' failed
make: *** [target/debs/sonic-device-data_1.0-1_all.deb] Error 1
Makefile:87: recipe for target 'target/debs/sonic-device-data_1.0-1_all.deb' failed
make: *** [target/debs/sonic-device-data_1.0-1_all.deb] Error 2