[PATCH v3 3/4] test: dm: add PHY common props unit tests

Simon Glass sjg at chromium.org
Sat Apr 11 16:38:15 CEST 2026


Hi Lucien,

On 2026-04-05T14:49:40, Lucien.Jheng <lucienzx159 at gmail.com> wrote:
> test: dm: add PHY common props unit tests
>
> Add obj-$(CONFIG_PHY_COMMON_PROPS) build entry in test/dm/Makefile and
> sandbox DM unit tests for the PHY common properties library, covering
> rx/tx polarity lookups for all relevant cases:
>
>   - missing property (defaults to PHY_POL_NORMAL)
>   - single value without names array (applies to all modes)
>   - count mismatch between values and names arrays (-EINVAL)
>   - name found by exact match
>   - name not found with no "default" fallback (-EINVAL)
>   - name not found with a "default" entry (uses fallback value)
>   - unsupported polarity value (-EOPNOTSUPP)
>
> Ported from Linux KUnit test:
>   linux/drivers/phy/phy-common-props-test.c
>
> Signed-off-by: Lucien.Jheng <lucienzx159 at gmail.com>
>
> test/dm/Makefile           |   1 +
>  test/dm/phy_common_props.c | 319 +++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 320 insertions(+)

> diff --git a/test/dm/phy_common_props.c b/test/dm/phy_common_props.c
> @@ -0,0 +1,319 @@
> +static int dm_test_phy_common_props_rx_missing(struct unit_test_state *uts)
> +{
> +     ofnode node = ofnode_path("/phy-common-props-missing");

This patch references DT nodes (e.g. /phy-common-props-missing) which
are added in patch 4/4. This breaks bisectability. Please can you
either squash patches 3 and 4 together, or swap their order so the DT
nodes are added first?

Regards,
Simon


More information about the U-Boot mailing list