Skip to content

[Celestica] [Leh800bcls] Bsp_tests: Add bsp test to check slot ID. - #1927

Closed
chee-zhang wants to merge 1 commit into
meta:mainfrom
chee-zhang:leh800bcls_add_bsp_tests_to_check_slot_id
Closed

chee-zhang wants to merge 1 commit into
meta:mainfrom
chee-zhang:leh800bcls_add_bsp_tests_to_check_slot_id

Conversation

@chee-zhang

@chee-zhang chee-zhang commented Nov 5, 2026 •

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
  clang-format.............................................................Passed
  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...........................................(no files to check)Skipped
  check for merge conflicts................................................Passed
  ruff check...........................................(no files to check)Skipped
  ruff format..........................................(no files to check)Skipped
  Check copyright headers in new FBOSS C/C++ files.........................Passed
  Prevent sai_impl in fboss manifest.......................................Passed

Summary

This PR is to add BSP test to check the slot ID.

  1. Add CableCartridgesTest.CableCartridgesCreated to check the BSP function and confirm that all cc_slot_id values are identical.
  2. Add CableCartridgesTest.ValidateSlotIdFileName

For the corresponding BSP function, please refer to kmods: anacapa: added slot ID driver based on PCA953x- #30

Reference PR: Support retrieving the slot ID through cable cartridge- #1926

Test Plan

Succeed to run bsp_tests.

  • NL1 + B0
[----------] 2 tests from CableCartridgesTest
[ RUN      ] CableCartridgesTest.CableCartridgesCreated
I1105 07:28:53.319571 240841 CableCartridgesTests.cpp:219] Found 2 Cable Cartridge device(s) in platform config to test:
I1105 07:28:53.319600 240841 CableCartridgesTests.cpp:223]   - LEH800BCLS_MCB.CABLE_CARTRIDGE_1
I1105 07:28:53.319603 240841 CableCartridgesTests.cpp:223]   - LEH800BCLS_MCB.CABLE_CARTRIDGE_0
I1105 07:28:53.319606 240841 CableCartridgesTests.cpp:230] Checking Cable Cartridge device: LEH800BCLS_MCB.CABLE_CARTRIDGE_1 (adapter: LEH800BCLS_MCB.MCB_IOB_I2C_MASTER_21, address: 0x27)
I1105 07:28:53.380900 240841 CableCartridgesTests.cpp:78] Read cc_slot_id_0 for LEH800BCLS_MCB.CABLE_CARTRIDGE_1 (at /sys/bus/i2c/devices/2-0027/): 0
I1105 07:28:53.382149 240841 CableCartridgesTests.cpp:78] Read cc_slot_id_1 for LEH800BCLS_MCB.CABLE_CARTRIDGE_1 (at /sys/bus/i2c/devices/2-0027/): 0
I1105 07:28:53.382175 240841 CableCartridgesTests.cpp:95] Driver for LEH800BCLS_MCB.CABLE_CARTRIDGE_1 (at /sys/bus/i2c/devices/2-0027/): anacapa_slot_id
I1105 07:28:53.382182 240841 CableCartridgesTests.cpp:230] Checking Cable Cartridge device: LEH800BCLS_MCB.CABLE_CARTRIDGE_0 (adapter: LEH800BCLS_MCB.MCB_IOB_I2C_MASTER_8, address: 0x27)
I1105 07:28:53.443421 240841 CableCartridgesTests.cpp:78] Read cc_slot_id_0 for LEH800BCLS_MCB.CABLE_CARTRIDGE_0 (at /sys/bus/i2c/devices/3-0027/): 0
I1105 07:28:53.444666 240841 CableCartridgesTests.cpp:78] Read cc_slot_id_1 for LEH800BCLS_MCB.CABLE_CARTRIDGE_0 (at /sys/bus/i2c/devices/3-0027/): 0
I1105 07:28:53.444684 240841 CableCartridgesTests.cpp:95] Driver for LEH800BCLS_MCB.CABLE_CARTRIDGE_0 (at /sys/bus/i2c/devices/3-0027/): anacapa_slot_id
I1105 07:28:53.444902 240841 CableCartridgesTests.cpp:175] Slot IDs match within LEH800BCLS_MCB.CABLE_CARTRIDGE_0: cc_slot_id_0 == cc_slot_id_1 == 0
I1105 07:28:53.444909 240841 CableCartridgesTests.cpp:175] Slot IDs match within LEH800BCLS_MCB.CABLE_CARTRIDGE_1: cc_slot_id_0 == cc_slot_id_1 == 0
I1105 07:28:53.444912 240841 CableCartridgesTests.cpp:208] Verified all 2 Cable Cartridge device(s) have matching slot ID: 0
[       OK ] CableCartridgesTest.CableCartridgesCreated (300 ms)
[ RUN      ] CableCartridgesTest.ValidateSlotIdFileName
I1105 07:28:53.617409 240841 CableCartridgesTests.cpp:297] Errors for valid names: 0
[       OK ] CableCartridgesTest.ValidateSlotIdFileName (172 ms)
[----------] 2 tests from CableCartridgesTest (472 ms total)

NL1_B0.zip

  • NL2 + B1

NL2_B1.zip

@meta-cla meta-cla Bot added the CLA Signed label Nov 5, 2026
@chee-zhang
chee-zhang force-pushed the leh800bcls_add_bsp_tests_to_check_slot_id branch from 7c25455 to 1320196 Compare November 5, 2026 06:20
@chee-zhang
chee-zhang marked this pull request as ready for review November 5, 2026 07:44
@chee-zhang
chee-zhang requested review from a team as code owners November 5, 2026 07:44
@chee-zhang chee-zhang changed the title [Celestica] Leh800bcls: Bsp_tests: Add bsp test to check slot ID [Celestica] [Leh800bcls] Bsp_tests: Add bsp test to check slot ID Nov 6, 2026
@chee-zhang
chee-zhang force-pushed the leh800bcls_add_bsp_tests_to_check_slot_id branch from 1320196 to 4eedf16 Compare November 13, 2026 02:46
@chee-zhang chee-zhang changed the title [Celestica] [Leh800bcls] Bsp_tests: Add bsp test to check slot ID [Celestica] [Leh800bcls] Bsp_tests: Add bsp test to check slot ID. Nov 13, 2026
@github-actions github-actions Bot added the project:leh800bcls FBOSS project: leh800bcls label Nov 13, 2026
@meta-codesync

meta-codesync Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

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

@meta-codesync meta-codesync Bot closed this in 7236a3b Dec 2, 2026
@meta-codesync meta-codesync Bot added the Merged label Dec 2, 2026
@meta-codesync

meta-codesync Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

@mikechoifb merged this pull request in 7236a3b.

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