Developer
Harshit Gulati
hgulati@meta.com
Performance
YoY:+348%Key patterns and highlights from this developer's activity.
Breakdown of growth, maintenance, and fixes effort over time.
Bugs introduced vs. fixed over time.
Reclassifies engineering effort based on bug attribution. Commits that introduced bugs are retrospectively counted as poor investments.
Investment Quality reclassifies engineering effort based on bug attribution data. Commits identified as buggy origins (those that introduced bugs later fixed by someone) have their grow and maintenance time moved into the Wasted Time category. Their waste (fix commits) remains counted as productive. All other commits retain their standard classification: grow is productive, maintenance is maintenance, and waste (fixes) is productive.
The standard model classifies commits as Growth, Maintenance, or Fixes. Investment Quality adds a quality lens: a commit that introduced a bug is retrospectively counted as a poor investment — the engineering time spent on it was wasted because it ultimately required additional fix work. Fix commits (Fixes in the standard model) are reframed as productive, because fixing bugs is valuable work.
Currently computed client-side from commit and bug attribution data. Ideal server-side endpoint:
POST /v1/organizations/{orgId}/investment-quality
Content-Type: application/json
Request:
{
"startTime": "2025-01-01T00:00:00Z",
"endTime": "2025-12-31T23:59:59Z",
"bucketSize": "BUCKET_SIZE_MONTH",
"groupBy": ["repository_id" | "deliverer_email"]
}
Response:
{
"productivePct": 74,
"maintenancePct": 18,
"wastedPct": 8,
"buckets": [
{
"bucketStart": "2025-01-01T00:00:00Z",
"productive": 4.2,
"maintenance": 1.8,
"wasted": 0.6
}
]
}Latest analyzed commits from this developer.
| Hash | Message | Date | Files |
|---|
Commit activity distribution by hour and day of week. Shows when this developer is most active.
Developers who frequently work on the same files and symbols. Higher score means stronger code collaboration.
| Effort |
|---|
| 65b5bb8d | This commit **refactors** the **`qsfp_service` HAL tests** to implement a **config-driven approach**, leveraging `TransceiverPropertiesDefault` for test data. It replaces static, parameterized test definitions with a dynamic registration mechanism, primarily within `HalTestApplicationModes.cpp` and `HalTest.h`, and updates `HalTestUtils.cpp` to support this new framework. This **maintenance** effort simplifies the **HAL testing framework** by making tests more flexible and easier to maintain, as they can now adapt to different transceiver configurations without requiring code modifications. Build configurations in `BUCK` and `cmake` are updated to reflect the new dependencies on transceiver properties libraries. | Mar 27 | 8 | maint |
| 80d47b64 | This commit **refactors** the `numHostLanes()` and `numMediaLanes()` methods within the **QSFP service module** (`QsfpModule.cpp`) to adopt a more **config-driven** approach. These functions now first attempt to retrieve host and media lane counts from the `TransceiverPropertiesManager`. For `MediaInterfaceCodes` not yet present in the configuration, the system gracefully falls back to the existing switch/case logic, ensuring continued functionality. This change improves the flexibility and maintainability of transceiver property management by allowing lane count definitions to be updated via configuration rather than requiring code modifications. | Mar 27 | 1 | maint |
| 802d998c | This commit introduces a **config-driven mechanism** for defining and managing **transceiver properties** within the `qsfp_service`, replacing the previous hardcoded approach. It adds new Thrift schemas, including `TransceiverPropertiesConfig`, and implements a dedicated **`TransceiverPropertiesManager`** to load, validate, and query these properties, which is then integrated into the existing `TransceiverManager`. This **new capability** significantly **simplifies the addition of new optics** by shifting from extensive code modifications to straightforward configuration updates. The change improves the overall maintainability and extensibility of the transceiver management subsystem, providing a default configuration for several SMF transceivers. | Mar 27 | 15 | grow |
| b91bee00 | This commit **refactors** the **`HwTransceiverUtils`** module, replacing hardcoded `switch/case` logic with **config-driven lookups** from `TransceiverPropertiesManager`. Specifically, the `verifyPortNameToLaneMap` function now uses `getExpectedMediaLanes` for multi-port modules, and `verifyDiagsCapability` leverages `isKnown()` checks for VDM and RxOutputControl capabilities. An **API enhancement** to `getExpectedMediaLanes` adds a `cfg::PortSpeed` parameter to handle future gearbox modules more accurately. This change improves the **maintainability and extensibility** of transceiver diagnostics and lane mapping by centralizing configuration, reducing the need for code changes when new transceiver types are introduced. | Mar 27 | 2 | maint |
| 40eeaef9 | This commit introduces a **new capability** for dynamically determining `MediaInterfaceCode` values within the **CMIS module**. It adds a `mediaLaneCodeToMediaInterfaceCode()` static method to `TransceiverPropertiesManager`, which utilizes a config-driven reverse map built at initialization. The `CmisModule::getMediaInterfaceId()` function is updated to leverage this new lookup when the module's `MediaInterfaceCode` is known, falling back to `CmisHelper` otherwise. This **feature enhancement** centralizes and makes the media interface identification process more flexible and configurable, improving the robustness of transceiver property management. | Mar 27 | 1 | grow |
| edee3b32 | This commit **refactors** the **`CmisModule`** within the `qsfp_service` to replace hardcoded logic for deriving Single-Mode Fiber (SMF) media interfaces. The `getModuleMediaInterface()` function now utilizes `TransceiverPropertiesManager::deriveSmfCode()` for a **config-driven derivation** based on transceiver properties like `smfCode`, `hostStartLanes`, and `smfLength`. This change improves maintainability and flexibility by allowing new SMF module types to be defined via configuration rather than requiring code modifications. It also ensures backward compatibility by falling back to `CmisHelper::smfMediaInterfaceMapping_` for legacy modules not yet in the new configuration. | Mar 27 | 2 | maint |
| ec675e17 | This commit **refactors** the **CMIS module's transceiver speed validation logic** by replacing a hardcoded static list of valid 8-lane speed combinations with **dynamic, per-module-type configuration entries**. Previously, `CmisHelper::getSmfValidSpeedCombinations()` provided a generic list, but now functions like `CmisModule::setApplicationSelectCodeAllPorts()` and `isRequestValidMultiportSpeedConfig()` retrieve supported speed combinations from `TransceiverPropertiesDefault.h`. This **enhancement** populates specific valid combinations for various SMF transceiver types, such as FR4_2x400G and DR4_2x800G. The primary impact is a **significant improvement in the correctness of speed validation**, preventing modules like DR4 from being incorrectly matched with FR4 combinations, thereby making the system more robust and adaptable. Associated tests have also been updated to reflect this new config-driven approach. | Mar 27 | 4 | maint |
| 28690c12 | This commit **enhances** the **CMIS module**'s speed-to-media-code lookup by replacing hardcoded mappings with a **configuration-driven mechanism**. It introduces `TransceiverPropertiesManager::getMediaCodesForSpeed()` to dynamically retrieve distinct SMF media interface codes for a given module type and port speed, derived from the module's `supportedSpeedCombinations` config. This change updates eight call sites across `CmisModule.cpp` and `CmisTest.cpp`, including functions like `setApplicationSelectCodeAllPorts` and `getAppSelCodeForSpeed`, to utilize this new lookup with a fallback to `CmisHelper::getSmfSpeedApplicationMapping()` when the config is empty. This improves the flexibility and maintainability of **transceiver application selection and speed configuration** within the `qsfp_service`. | Mar 27 | 3 | grow |
| 74cc891f | This commit **updates the fake EEPROM data** for various **CMIS transceivers**, including LPO and DR4 types, within the `qsfp_service` module's testing framework. It **corrects test cases** and **synchronizes simulated EEPROM values** like lower page and SMF length bytes to align with the latest hardware specifications. This **maintenance update** ensures the accuracy and reliability of transceiver tests by reflecting current CMIS 2x400G FR4 LPO and other module characteristics. The changes primarily impact the **transceiver testing infrastructure**, preventing false positives or negatives due to outdated simulated data. | Mar 23 | 2 | maint |
| c5a30ea9 | This commit introduces a **new common infrastructure** for **HAL tests** by adding `forEachTransceiverParallel()` to the `HalTest` fixture class, centralizing the pattern of executing test logic in parallel for each transceiver. This method handles transceiver ID retrieval, optional filtering, parallel execution, and result reporting, significantly streamlining test development. As a result, several existing **HAL test files**, including `HalTestFirmwareUpgrade.cpp`, `HalTestModuleInit.cpp`, `HalTestModuleAdvertisement.cpp`, and `HalTestApplicationModes.cpp`, have been **refactored** to leverage this new utility. This **refactoring** improves the maintainability and consistency of the **QSFP service's hardware abstraction layer tests**, also introducing the `HAL_CHECK_FATAL_VOID` macro for use in void-returning test lambdas. | Mar 18 | 12 | maint |
| dccb366a | This commit introduces a **new test capability** to validate **QSFP service transceiver firmware upgrades**. It adds a comprehensive **bidirectional firmware upgrade test** (A->B and B->A) within the `T0HalTest` fixture, incorporating a 6-minute timeout per direction to ensure robust functionality. To support this, the `hal_test_config.thrift` schema is enhanced by renaming `HalTestStartupConfig` to `HalTestTransceiverConfig` and adding a `previousFirmware` field to `HalTestTransceiverEntry`, enabling the configuration of specific firmware versions for testing. This significantly improves the **firmware management validation** within the QSFP service's hardware abstraction layer. | Mar 18 | 5 | maint |
| 658276fd | This commit performs a **logging refinement** within the **QSFP service's CMIS module** by reducing the verbosity of specific VDM performance monitoring messages. It lowers the log level from `DBG2` to `DBG5` for "Coherent VDM stats not available", "FEC PM stats not available", and "Link PM stats not available" messages originating from `CmisModule.cpp`. This **maintenance** change addresses instances where the `getVdmPerfMonitorStats` function reports expected unavailability of certain statistics, which previously generated excessive noise in the logs. The primary impact is **reduced log verbosity**, leading to cleaner system logs and improved focus on more critical events. | Mar 17 | 1 | maint |
| 9a9a4a94 | This commit delivers **critical fixes for the OSS build** of the **`hal_test`** component, addressing two distinct compilation issues. It resolves a **CMake dependency error** by adding the missing `qsfp_config_cpp2` dependency to `hal_test_config_cpp2`, which previously caused a missing header error. Concurrently, it fixes a **compiler warning** (`-Werror=return-type`) in `fboss/qsfp_service/test/hal_test/HalTestUtils.cpp` by adding a `throw` statement to `getExpectedMediaInterfaceCodes()`, ensuring all code paths are handled. These **build system and code quality improvements** are essential for a successful and warning-free compilation of the **`hal_test`** suite in open-source environments. | Mar 17 | 2 | waste |
| 85164654 | This commit introduces **startup firmware upgrade support** for the **Hardware Abstraction Layer (HAL) test suite**, allowing tests to specify and enforce required transceiver firmware versions. A new `HalTestStartupConfig` field in the `hal_test_config.thrift` schema enables defining per-transceiver firmware requirements. Utility functions `upgradeFirmware()` and `applyStartupFirmwareUpgrades()` were added to `HalTestUtils` to manage and apply these updates, which are then invoked during `HalTest::SetUp()` to ensure transceivers are at the correct firmware level before any tests execute. This **new feature** significantly enhances test reliability by guaranteeing a consistent and controlled test environment. | Mar 14 | 5 | grow |
| 29dd95fe | This commit introduces a **tiered test ordering system (T0/T1/T2)** for the **QSFP service HAL test suite**, enhancing test organization and failure categorization. It achieves this by adding a virtual `shouldApplyStartupFirmware()` method to `HalTest` and defining new `T0HalTest`, `T1HalTest`, and `T2HalTest` fixture classes. This **refactoring** allows `T0HalTest`s to optionally skip startup firmware upgrades for faster execution and ensures that the test binary **aborts immediately** if any critical `T0HalTest` fails, preventing further test execution on a fundamentally broken system. All existing tests within `fboss/qsfp_service/test/hal_test/` have been reclassified to use the new `T1HalTest` or `T2HalTest` fixtures, establishing a clear hierarchy for future test development and execution. | Mar 14 | 6 | maint |
| f14e8ddd | This commit **refactors the `qsfp_service` HAL tests** by replacing multiple manual `PROGRAM_MODE_TEST` macro invocations with a single **GTest parameterized test**. This new test leverages `TEnumTraits` to automatically iterate over all `TcvrOperationalMode` enum values, ensuring comprehensive coverage for transceiver operational mode programming. This **test infrastructure improvement** significantly **enhances maintainability and future-proofs test coverage**, as new modes added to the Thrift enum will now automatically gain test validation without requiring manual updates. | Mar 13 | 2 | maint |
| 75051beb | This commit **refactors** the **HAL speed change test suite** by replacing the manual `MODE_CHANGE_TEST` macro with a **parameterized `HalTestSpeedChange` class**. It introduces a new `speedChangeTransitions` field in the `HalTestMediaInterfaceConfig` Thrift definition, allowing test cases to be **defined and managed via configuration** rather than hardcoded C++ logic. This **test infrastructure improvement** significantly **simplifies the addition of new speed change transition tests**, requiring only a config change and enhancing the maintainability of the `fboss/qsfp_service/test/hal_test` module. Utility functions like `getAllSpeedChangeTransitions` are added to support this new configuration-driven approach. | Mar 13 | 6 | maint |
| cabd025f | This commit **adds new tests** to the **QSFP service's Hardware Abstraction Layer (HAL) test suite** to verify transceiver application mode programming. These new tests, located in `HalTestApplicationModes.cpp`, specifically focus on validating the correct programming and transitions between different operational modes for QSFP modules. To ensure consistent and reliable test execution, the existing `HalTest` setup in `HalTest.cpp` is also adjusted to force refreshing all QSFP pages and set the data refresh interval to zero. This **enhances test coverage and reliability** for critical QSFP module functionality related to application mode selection. | Mar 13 | 4 | maint |
| f1ad764a | This commit introduces **new infrastructure** to the **QSFP service HAL tests** for verifying **transceiver operational mode programming**. It defines a `TcvrOperationalMode` enum and default configurations in `hal_test_config.thrift` to specify test speeds, alongside helper functions like `createProgramTransceiverState` in `HalTestUtils.cpp/h` to build and validate transceiver states for these modes. Additionally, a 2-second sleep is incorporated into `BspTransceiverImpl.cpp` after transceiver reset, aligning test behavior with production for proper module initialization. This work primarily provides a **new capability** for testing, significantly enhancing the test coverage for **transceiver configuration and functionality** within the HAL test suite. | Mar 13 | 7 | grow |
| b0a2b9a2 | This commit **adds comprehensive CMake build support** for the **QSFP service's Hardware Abstraction Layer (HAL) test suite**. It introduces new CMake targets in `cmake/QsfpServiceTestHalTest.cmake` for the `bsp_transceiver_impl`, `hal_test_utils`, and `hal_test_base` libraries, along with the `qsfp_hal_test` executable and its install rule. This **feature addition** also includes support for the `hal_test_config_cpp2` thrift library within the CMake build system. Concurrently, the existing BUCK binary target `hal_test` is **refactored** and renamed to `qsfp_hal_test` in `fboss/qsfp_service/test/hal_test/BUCK` to ensure consistency across build systems. This change enables the **QSFP HAL tests** to be built and installed using CMake, streamlining the development and testing workflow for this critical component. | Mar 11 | 3 | grow |
This commit **refactors** the **`qsfp_service` HAL tests** to implement a **config-driven approach**, leveraging `TransceiverPropertiesDefault` for test data. It replaces static, parameterized test definitions with a dynamic registration mechanism, primarily within `HalTestApplicationModes.cpp` and `HalTest.h`, and updates `HalTestUtils.cpp` to support this new framework. This **maintenance** effort simplifies the **HAL testing framework** by making tests more flexible and easier to maintain, as they can now adapt to different transceiver configurations without requiring code modifications. Build configurations in `BUCK` and `cmake` are updated to reflect the new dependencies on transceiver properties libraries.
This commit **refactors** the `numHostLanes()` and `numMediaLanes()` methods within the **QSFP service module** (`QsfpModule.cpp`) to adopt a more **config-driven** approach. These functions now first attempt to retrieve host and media lane counts from the `TransceiverPropertiesManager`. For `MediaInterfaceCodes` not yet present in the configuration, the system gracefully falls back to the existing switch/case logic, ensuring continued functionality. This change improves the flexibility and maintainability of transceiver property management by allowing lane count definitions to be updated via configuration rather than requiring code modifications.
This commit introduces a **config-driven mechanism** for defining and managing **transceiver properties** within the `qsfp_service`, replacing the previous hardcoded approach. It adds new Thrift schemas, including `TransceiverPropertiesConfig`, and implements a dedicated **`TransceiverPropertiesManager`** to load, validate, and query these properties, which is then integrated into the existing `TransceiverManager`. This **new capability** significantly **simplifies the addition of new optics** by shifting from extensive code modifications to straightforward configuration updates. The change improves the overall maintainability and extensibility of the transceiver management subsystem, providing a default configuration for several SMF transceivers.
This commit **refactors** the **`HwTransceiverUtils`** module, replacing hardcoded `switch/case` logic with **config-driven lookups** from `TransceiverPropertiesManager`. Specifically, the `verifyPortNameToLaneMap` function now uses `getExpectedMediaLanes` for multi-port modules, and `verifyDiagsCapability` leverages `isKnown()` checks for VDM and RxOutputControl capabilities. An **API enhancement** to `getExpectedMediaLanes` adds a `cfg::PortSpeed` parameter to handle future gearbox modules more accurately. This change improves the **maintainability and extensibility** of transceiver diagnostics and lane mapping by centralizing configuration, reducing the need for code changes when new transceiver types are introduced.
This commit introduces a **new capability** for dynamically determining `MediaInterfaceCode` values within the **CMIS module**. It adds a `mediaLaneCodeToMediaInterfaceCode()` static method to `TransceiverPropertiesManager`, which utilizes a config-driven reverse map built at initialization. The `CmisModule::getMediaInterfaceId()` function is updated to leverage this new lookup when the module's `MediaInterfaceCode` is known, falling back to `CmisHelper` otherwise. This **feature enhancement** centralizes and makes the media interface identification process more flexible and configurable, improving the robustness of transceiver property management.
This commit **refactors** the **`CmisModule`** within the `qsfp_service` to replace hardcoded logic for deriving Single-Mode Fiber (SMF) media interfaces. The `getModuleMediaInterface()` function now utilizes `TransceiverPropertiesManager::deriveSmfCode()` for a **config-driven derivation** based on transceiver properties like `smfCode`, `hostStartLanes`, and `smfLength`. This change improves maintainability and flexibility by allowing new SMF module types to be defined via configuration rather than requiring code modifications. It also ensures backward compatibility by falling back to `CmisHelper::smfMediaInterfaceMapping_` for legacy modules not yet in the new configuration.
This commit **refactors** the **CMIS module's transceiver speed validation logic** by replacing a hardcoded static list of valid 8-lane speed combinations with **dynamic, per-module-type configuration entries**. Previously, `CmisHelper::getSmfValidSpeedCombinations()` provided a generic list, but now functions like `CmisModule::setApplicationSelectCodeAllPorts()` and `isRequestValidMultiportSpeedConfig()` retrieve supported speed combinations from `TransceiverPropertiesDefault.h`. This **enhancement** populates specific valid combinations for various SMF transceiver types, such as FR4_2x400G and DR4_2x800G. The primary impact is a **significant improvement in the correctness of speed validation**, preventing modules like DR4 from being incorrectly matched with FR4 combinations, thereby making the system more robust and adaptable. Associated tests have also been updated to reflect this new config-driven approach.
This commit **enhances** the **CMIS module**'s speed-to-media-code lookup by replacing hardcoded mappings with a **configuration-driven mechanism**. It introduces `TransceiverPropertiesManager::getMediaCodesForSpeed()` to dynamically retrieve distinct SMF media interface codes for a given module type and port speed, derived from the module's `supportedSpeedCombinations` config. This change updates eight call sites across `CmisModule.cpp` and `CmisTest.cpp`, including functions like `setApplicationSelectCodeAllPorts` and `getAppSelCodeForSpeed`, to utilize this new lookup with a fallback to `CmisHelper::getSmfSpeedApplicationMapping()` when the config is empty. This improves the flexibility and maintainability of **transceiver application selection and speed configuration** within the `qsfp_service`.
This commit **updates the fake EEPROM data** for various **CMIS transceivers**, including LPO and DR4 types, within the `qsfp_service` module's testing framework. It **corrects test cases** and **synchronizes simulated EEPROM values** like lower page and SMF length bytes to align with the latest hardware specifications. This **maintenance update** ensures the accuracy and reliability of transceiver tests by reflecting current CMIS 2x400G FR4 LPO and other module characteristics. The changes primarily impact the **transceiver testing infrastructure**, preventing false positives or negatives due to outdated simulated data.
This commit introduces a **new common infrastructure** for **HAL tests** by adding `forEachTransceiverParallel()` to the `HalTest` fixture class, centralizing the pattern of executing test logic in parallel for each transceiver. This method handles transceiver ID retrieval, optional filtering, parallel execution, and result reporting, significantly streamlining test development. As a result, several existing **HAL test files**, including `HalTestFirmwareUpgrade.cpp`, `HalTestModuleInit.cpp`, `HalTestModuleAdvertisement.cpp`, and `HalTestApplicationModes.cpp`, have been **refactored** to leverage this new utility. This **refactoring** improves the maintainability and consistency of the **QSFP service's hardware abstraction layer tests**, also introducing the `HAL_CHECK_FATAL_VOID` macro for use in void-returning test lambdas.
This commit introduces a **new test capability** to validate **QSFP service transceiver firmware upgrades**. It adds a comprehensive **bidirectional firmware upgrade test** (A->B and B->A) within the `T0HalTest` fixture, incorporating a 6-minute timeout per direction to ensure robust functionality. To support this, the `hal_test_config.thrift` schema is enhanced by renaming `HalTestStartupConfig` to `HalTestTransceiverConfig` and adding a `previousFirmware` field to `HalTestTransceiverEntry`, enabling the configuration of specific firmware versions for testing. This significantly improves the **firmware management validation** within the QSFP service's hardware abstraction layer.
This commit performs a **logging refinement** within the **QSFP service's CMIS module** by reducing the verbosity of specific VDM performance monitoring messages. It lowers the log level from `DBG2` to `DBG5` for "Coherent VDM stats not available", "FEC PM stats not available", and "Link PM stats not available" messages originating from `CmisModule.cpp`. This **maintenance** change addresses instances where the `getVdmPerfMonitorStats` function reports expected unavailability of certain statistics, which previously generated excessive noise in the logs. The primary impact is **reduced log verbosity**, leading to cleaner system logs and improved focus on more critical events.
This commit delivers **critical fixes for the OSS build** of the **`hal_test`** component, addressing two distinct compilation issues. It resolves a **CMake dependency error** by adding the missing `qsfp_config_cpp2` dependency to `hal_test_config_cpp2`, which previously caused a missing header error. Concurrently, it fixes a **compiler warning** (`-Werror=return-type`) in `fboss/qsfp_service/test/hal_test/HalTestUtils.cpp` by adding a `throw` statement to `getExpectedMediaInterfaceCodes()`, ensuring all code paths are handled. These **build system and code quality improvements** are essential for a successful and warning-free compilation of the **`hal_test`** suite in open-source environments.
This commit introduces **startup firmware upgrade support** for the **Hardware Abstraction Layer (HAL) test suite**, allowing tests to specify and enforce required transceiver firmware versions. A new `HalTestStartupConfig` field in the `hal_test_config.thrift` schema enables defining per-transceiver firmware requirements. Utility functions `upgradeFirmware()` and `applyStartupFirmwareUpgrades()` were added to `HalTestUtils` to manage and apply these updates, which are then invoked during `HalTest::SetUp()` to ensure transceivers are at the correct firmware level before any tests execute. This **new feature** significantly enhances test reliability by guaranteeing a consistent and controlled test environment.
This commit introduces a **tiered test ordering system (T0/T1/T2)** for the **QSFP service HAL test suite**, enhancing test organization and failure categorization. It achieves this by adding a virtual `shouldApplyStartupFirmware()` method to `HalTest` and defining new `T0HalTest`, `T1HalTest`, and `T2HalTest` fixture classes. This **refactoring** allows `T0HalTest`s to optionally skip startup firmware upgrades for faster execution and ensures that the test binary **aborts immediately** if any critical `T0HalTest` fails, preventing further test execution on a fundamentally broken system. All existing tests within `fboss/qsfp_service/test/hal_test/` have been reclassified to use the new `T1HalTest` or `T2HalTest` fixtures, establishing a clear hierarchy for future test development and execution.
This commit **refactors the `qsfp_service` HAL tests** by replacing multiple manual `PROGRAM_MODE_TEST` macro invocations with a single **GTest parameterized test**. This new test leverages `TEnumTraits` to automatically iterate over all `TcvrOperationalMode` enum values, ensuring comprehensive coverage for transceiver operational mode programming. This **test infrastructure improvement** significantly **enhances maintainability and future-proofs test coverage**, as new modes added to the Thrift enum will now automatically gain test validation without requiring manual updates.
This commit **refactors** the **HAL speed change test suite** by replacing the manual `MODE_CHANGE_TEST` macro with a **parameterized `HalTestSpeedChange` class**. It introduces a new `speedChangeTransitions` field in the `HalTestMediaInterfaceConfig` Thrift definition, allowing test cases to be **defined and managed via configuration** rather than hardcoded C++ logic. This **test infrastructure improvement** significantly **simplifies the addition of new speed change transition tests**, requiring only a config change and enhancing the maintainability of the `fboss/qsfp_service/test/hal_test` module. Utility functions like `getAllSpeedChangeTransitions` are added to support this new configuration-driven approach.
This commit **adds new tests** to the **QSFP service's Hardware Abstraction Layer (HAL) test suite** to verify transceiver application mode programming. These new tests, located in `HalTestApplicationModes.cpp`, specifically focus on validating the correct programming and transitions between different operational modes for QSFP modules. To ensure consistent and reliable test execution, the existing `HalTest` setup in `HalTest.cpp` is also adjusted to force refreshing all QSFP pages and set the data refresh interval to zero. This **enhances test coverage and reliability** for critical QSFP module functionality related to application mode selection.
This commit introduces **new infrastructure** to the **QSFP service HAL tests** for verifying **transceiver operational mode programming**. It defines a `TcvrOperationalMode` enum and default configurations in `hal_test_config.thrift` to specify test speeds, alongside helper functions like `createProgramTransceiverState` in `HalTestUtils.cpp/h` to build and validate transceiver states for these modes. Additionally, a 2-second sleep is incorporated into `BspTransceiverImpl.cpp` after transceiver reset, aligning test behavior with production for proper module initialization. This work primarily provides a **new capability** for testing, significantly enhancing the test coverage for **transceiver configuration and functionality** within the HAL test suite.
This commit **adds comprehensive CMake build support** for the **QSFP service's Hardware Abstraction Layer (HAL) test suite**. It introduces new CMake targets in `cmake/QsfpServiceTestHalTest.cmake` for the `bsp_transceiver_impl`, `hal_test_utils`, and `hal_test_base` libraries, along with the `qsfp_hal_test` executable and its install rule. This **feature addition** also includes support for the `hal_test_config_cpp2` thrift library within the CMake build system. Concurrently, the existing BUCK binary target `hal_test` is **refactored** and renamed to `qsfp_hal_test` in `fboss/qsfp_service/test/hal_test/BUCK` to ensure consistency across build systems. This change enables the **QSFP HAL tests** to be built and installed using CMake, streamlining the development and testing workflow for this critical component.