Skip to content

[Celestica] Ladakh800bcls: Bsp: Add mdio bsp tests#1185

Open
chee-zhang wants to merge 1 commit into
facebook:mainfrom
chee-zhang:ladakh800bcls_add_mdio_bsp_tests
Open

[Celestica] Ladakh800bcls: Bsp: Add mdio bsp tests#1185
chee-zhang wants to merge 1 commit into
facebook:mainfrom
chee-zhang:ladakh800bcls_add_mdio_bsp_tests

Conversation

@chee-zhang
Copy link
Copy Markdown
Contributor

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run
shellcheck...........................................(no files to check)Skipped
shfmt................................................(no files to check)Skipped
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check json...............................................................Passed
check for merge conflicts................................................Passed
ruff check...........................................(no files to check)Skipped
ruff format..........................................(no files to check)Skipped
Prevent sai_impl in fboss manifest.......................................Passed

Summary

To verify the MDIO function of BSP, need add related tests.

  1. MdioTest.CreateMdioBus: Verifies the ability to add and delete an MDIO bus.
  2. MdioTest.MdioBusReadAndWrite: Verifies read and write operations. The test MDIO bus and related registers are configured via bsp_tests.json.

Test Plan

[root@localhost fboss]# LD_LIBRARY_PATH=./lib/ ./bin/bsp_tests  --bsp_tests_config_file ./config/bsp_tests.json --gtest_filter=MdioTest.* 2>&1 | tee -a "logs/bsp_tests.log" &
[1] 151024
[root@localhost fboss]# Note: Google Test filter = MdioTest.*
[==========] Running 2 tests from 1 test suite.
[----------] Global test environment set-up.
I0509 17:29:29.720261 151023 PlatformNameLib.cpp:84] Platform name read from cache: LADAKH800BCLS
I0509 17:29:29.720365 151023 BspTestEnvironment.cpp:32] Platform: LADAKH800BCLS
I0509 17:29:29.720799 151023 PlatformNameLib.cpp:84] Platform name read from cache: LADAKH800BCLS
[----------] 2 tests from MdioTest
[ RUN      ] MdioTest.CreateMdioBus
[       OK ] MdioTest.CreateMdioBus (2487 ms)
[ RUN      ] MdioTest.MdioBusReadAndWrite
[       OK ] MdioTest.MdioBusReadAndWrite (5714 ms)
[----------] 2 tests from MdioTest (8202 ms total)

[----------] Global test environment tear-down
[==========] 2 tests from 1 test suite ran. (18072 ms total)
[  PASSED  ] 2 tests.

When adding --logging=DBG4, details can be found in the log below.
bsp_tests.log

@chee-zhang chee-zhang requested review from a team as code owners May 13, 2026 02:16
@meta-cla meta-cla Bot added the CLA Signed label May 13, 2026
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented May 15, 2026

@mikechoifb has imported this pull request. If you are a Meta employee, you can view this in D105336351.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant