[PATCH v4 7/7] test: mux-cmd: Add tests for the 'mux' command

Simon Glass sjg at chromium.org
Tue Oct 27 05:52:06 CET 2020


Hi Pratyush,

On Fri, 16 Oct 2020 at 04:46, Pratyush Yadav <p.yadav at ti.com> wrote:
>
> Tests tests run the three mux subcommands: list, select, and deselect,
> and verify that the commands do what we expect.
>
> Signed-off-by: Pratyush Yadav <p.yadav at ti.com>
> ---
>
> Notes:
>     New in v4.
>
>  configs/sandbox_defconfig |   1 +
>  test/dm/Makefile          |   1 +
>  test/dm/mux-cmd.c         | 177 ++++++++++++++++++++++++++++++++++++++
>  3 files changed, 179 insertions(+)
>  create mode 100644 test/dm/mux-cmd.c
>
> diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
> index f3c4883032..e573ae075b 100644
> --- a/configs/sandbox_defconfig
> +++ b/configs/sandbox_defconfig
> @@ -55,6 +55,7 @@ CONFIG_CMD_GPT_RENAME=y
>  CONFIG_CMD_IDE=y
>  CONFIG_CMD_I2C=y
>  CONFIG_CMD_LSBLK=y
> +CONFIG_CMD_MUX=y
>  CONFIG_CMD_OSD=y
>  CONFIG_CMD_PCI=y
>  CONFIG_CMD_READ=y
> diff --git a/test/dm/Makefile b/test/dm/Makefile
> index 93484b48eb..8b3d77e34e 100644
> --- a/test/dm/Makefile
> +++ b/test/dm/Makefile
> @@ -34,6 +34,7 @@ obj-y += irq.o
>  obj-$(CONFIG_LED) += led.o
>  obj-$(CONFIG_DM_MAILBOX) += mailbox.o
>  obj-$(CONFIG_DM_MMC) += mmc.o
> +obj-$(CONFIG_CMD_MUX) += mux-cmd.o
>  obj-y += fdtdec.o
>  obj-y += ofnode.o
>  obj-y += ofread.o
> diff --git a/test/dm/mux-cmd.c b/test/dm/mux-cmd.c
> new file mode 100644
> index 0000000000..11c237b5da
> --- /dev/null
> +++ b/test/dm/mux-cmd.c
> @@ -0,0 +1,177 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (C) 2020 Texas Instruments Inc.
> + * Pratyush Yadav <p.yadav at ti.com>
> + */
> +#include <common.h>
> +#include <dm.h>
> +#include <mux.h>
> +#include <mux-internal.h>
> +#include <dt-bindings/mux/mux.h>
> +#include <asm/test.h>
> +#include <dm/test.h>
> +#include <test/ut.h>
> +#include <console.h>
> +#include <rand.h>

Check header order

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list