From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 14/38] test: cmd: Add a basic test for 'addrmap' command
Date: Mon, 22 Feb 2021 09:00:27 -0500 [thread overview]
Message-ID: <20210222140027.GT10169@bill-the-cat> (raw)
In-Reply-To: <CAPnjgZ3ELK2HPiOsba+35BSd-eVq7DDP2zoTc5Gd4X9=Uh0tJA@mail.gmail.com>
On Mon, Feb 22, 2021 at 02:20:35AM -0700, Simon Glass wrote:
> Hi Bin,
>
> On Sun, 21 Feb 2021 at 18:55, Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > Hi Simon,
> >
> > On Mon, Feb 22, 2021 at 12:24 AM Simon Glass <sjg@chromium.org> wrote:
> > >
> > > Hi Bin,
> > >
> > > On Sat, 20 Feb 2021 at 06:01, Bin Meng <bmeng.cn@gmail.com> wrote:
> > > >
> > > > Hi Simon,
> > > >
> > > > On Sat, Feb 20, 2021 at 7:55 PM Simon Glass <sjg@chromium.org> wrote:
> > > > >
> > > > > On Thu, 18 Feb 2021 at 08:59, Bin Meng <bmeng.cn@gmail.com> wrote:
> > > > > >
> > > > > > This adds a basic test for the newly introduced 'addrmap' command.
> > > > > >
> > > > > > Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> > > > > >
> > > > > > ---
> > > > > >
> > > > > > Changes in v2:
> > > > > > - new patch: test: cmd: Add a basic test for 'addrmap' command
> > > > > >
> > > > > > include/test/suites.h | 2 ++
> > > > > > test/cmd/Makefile | 1 +
> > > > > > test/cmd/addrmap.c | 38 ++++++++++++++++++++++++++++++++++++++
> > > > > > test/cmd_ut.c | 6 ++++++
> > > > > > 4 files changed, 47 insertions(+)
> > > > > > create mode 100644 test/cmd/addrmap.c
> > > > >
> > > > > Reviewed-by: Simon Glass <sjg@chromium.org>
> > > > >
> > > > > Just checking this test is enabled for sandbox?
> > > >
> > > > Not yet. I don't think sandbox has enabled CONFIG_ADDR_MAP.
> > >
> > > OK then can you please enable it so we have test coverage?
> >
> > I am not sure if Sandbox can support CONFIG_ADDR_MAP (non-identity
> > virtual-physical mapping)?
>
> Well it doesn't even really need to support it fully. Just adding the
> config and writing a test that sets a few entries and checks the
> functions in addrmap.h do the right thing should be enough. It should
> be 10 lines of code.
>
> >
> > As Tom mentioned here [1], enabling unit tests on QEMU targets makes more sense?
> >
> > [1] https://lists.denx.de/pipermail/u-boot/2021-February/441779.html
>
> That was referring to a qemu-specific feature (called into qemu,
> actually). But in this case, if there is a failure, how will someone
> diagnose it? Run a huge functional test with qemu to see that it fails
> somewhere...? I think unit tests are far more useful for little
> features.
So, we have a few different forms of checking. We have "make check",
"make qcheck" and make "tcheck", which are handy for running pytest on
sandbox and some of the test suites to our tools. We also have CI
running (I believe) all of the same tests as "make check", and then also
running pytest on a number of emulated platforms. We also have
infrequent static code analysis via Coverity scan, based on sandbox
builds. So it's good that anything that can be built on sandbox is
built on sandbox. But when it comes to pytests, the line of where to
run what is a lot fuzzier. addrmap should have a test, and it should be
run on whatever qemu platforms it can be tested on, and it will be
tested frequently in CI.
In the end, looking at the test we have here now too, I suppose yes, if
it's only 10 lines of code so that addrmap compiles for sandbox (for
static testing) and then this test runs/passes, we should do that, it's
fine and good to, yes.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210222/28c1252d/attachment.sig>
next prev parent reply other threads:[~2021-02-22 14:00 UTC|newest]
Thread overview: 94+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-18 15:57 [PATCH v2 00/38] ppc: qemu: Convert qemu-ppce500 to driver model and enable additional driver support Bin Meng
2021-02-18 15:57 ` [PATCH v2 01/38] pci: fsl_pci_init: Dynamically allocate the PCI regions Bin Meng
2021-02-20 11:54 ` Simon Glass
2021-02-20 13:57 ` Tom Rini
2021-02-18 15:57 ` [PATCH v2 02/38] ppc: qemu: Update MAINTAINERS for correct email address Bin Meng
2021-02-22 7:39 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 03/38] common: fdt_support: Support special case of PCI address in fdt_read_prop() Bin Meng
2021-02-20 11:54 ` Simon Glass
2021-02-20 13:03 ` Bin Meng
2021-02-22 7:42 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 04/38] ppc: qemu: Support non-identity PCI bus address Bin Meng
2021-02-18 15:57 ` [PATCH v2 05/38] ppc: qemu: Fix CONFIG_SYS_PCI_MAP_END Bin Meng
2021-02-22 7:47 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 06/38] ppc: mpc85xx: Wrap LAW related codes with CONFIG_FSL_LAW Bin Meng
2021-02-22 8:12 ` Priyanka Jain
2021-02-22 8:53 ` Bin Meng
2021-02-23 10:43 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 07/38] ppc: qemu: Drop init_laws() and print_laws() Bin Meng
2021-02-18 15:57 ` [PATCH v2 08/38] ppc: qemu: Drop board_early_init_f() Bin Meng
2021-02-22 8:14 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 09/38] ppc: qemu: Enable OF_CONTROL Bin Meng
2021-02-22 8:14 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 10/38] ppc: qemu: Enable driver model Bin Meng
2021-02-22 8:14 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 11/38] include: Remove extern from addr_map.h Bin Meng
2021-02-22 8:16 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 12/38] lib: addr_map: Move address_map[] type to the header file Bin Meng
2021-02-22 8:17 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 13/38] cmd: Add a command to display the address map Bin Meng
2021-02-20 11:54 ` Simon Glass
2021-02-22 8:18 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 14/38] test: cmd: Add a basic test for 'addrmap' command Bin Meng
2021-02-20 11:54 ` Simon Glass
2021-02-20 13:01 ` Bin Meng
2021-02-21 16:24 ` Simon Glass
2021-02-22 1:55 ` Bin Meng
2021-02-22 9:20 ` Simon Glass
2021-02-22 12:13 ` Bin Meng
2021-02-22 14:00 ` Tom Rini [this message]
2021-02-18 15:57 ` [PATCH v2 15/38] lib: kconfig: Mention CONFIG_ADDR_MAP limitation in the help Bin Meng
2021-02-22 8:19 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 16/38] ppc: io.h: Use addrmap_ translation APIs only in post-relocation phase Bin Meng
2021-02-22 8:55 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 17/38] common: Move initr_addr_map() to a bit earlier Bin Meng
2021-02-22 9:05 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 18/38] ppc: qemu: Switch over to use DM serial Bin Meng
2021-02-22 9:05 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 19/38] pci: mpc85xx: Wrap LAW programming with CONFIG_FSL_LAW Bin Meng
2021-02-21 7:06 ` Heiko Schocher
2021-02-22 9:06 ` Priyanka Jain
2021-02-22 12:10 ` Bin Meng
2021-02-23 10:43 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 20/38] pci: mpc85xx: Support controller register physical address beyond 32-bit Bin Meng
2021-02-21 7:06 ` Heiko Schocher
2021-02-22 9:07 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 21/38] pci: mpc85xx: Support 64-bit bus and cpu address Bin Meng
2021-02-21 7:06 ` Heiko Schocher
2021-02-18 15:57 ` [PATCH v2 22/38] ppc: qemu: Switch over to use DM ETH and PCI Bin Meng
2021-02-20 11:54 ` Simon Glass
2021-02-22 9:12 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 23/38] ppc: qemu: Drop CONFIG_OF_BOARD_SETUP Bin Meng
2021-02-18 15:57 ` [PATCH v2 24/38] cmd: Fix virtio command dependency Bin Meng
2021-02-22 9:13 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 25/38] ppc: qemu: Enable VirtIO NET support Bin Meng
2021-02-22 9:13 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 26/38] virtio: Fix VirtIO BLK driver dependency Bin Meng
2021-02-20 11:54 ` Simon Glass
2021-02-22 9:13 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 27/38] ppc: qemu: Enable VirtIO BLK support Bin Meng
2021-02-22 9:13 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 28/38] ppc: mpc85xx: Add 'gpibe' register to 'struct ccsr_gpio' Bin Meng
2021-02-22 9:13 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 29/38] gpio: mpc8xxx: Support controller register physical address beyond 32-bit Bin Meng
2021-02-22 9:13 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 30/38] ppc: qemu: Enable GPIO support Bin Meng
2021-02-22 9:13 ` Priyanka Jain
2021-02-18 15:57 ` [PATCH v2 31/38] dm: sysreset: Add a Kconfig option for the 'reset' command Bin Meng
2021-02-20 11:55 ` Simon Glass
2021-02-22 9:15 ` Priyanka Jain
2021-02-18 15:58 ` [PATCH v2 32/38] ppc: qemu: Enable support for power off via GPIO Bin Meng
2021-02-22 9:15 ` Priyanka Jain
2021-02-18 15:58 ` [PATCH v2 33/38] ppc: qemu: Enable RTC support via I2C Bin Meng
2021-02-22 9:15 ` Priyanka Jain
2021-02-18 15:58 ` [PATCH v2 34/38] ppc: qemu: Delete the temporary FDT virtual-physical mapping after U-Boot is relocated Bin Meng
2021-02-22 9:16 ` Priyanka Jain
2021-02-18 15:58 ` [PATCH v2 35/38] ppc: qemu: Drop a custom env variable 'fdt_addr_r' Bin Meng
2021-02-22 9:16 ` Priyanka Jain
2021-02-18 15:58 ` [PATCH v2 36/38] ppc: qemu: Drop fixed_sdram() Bin Meng
2021-02-22 9:16 ` Priyanka Jain
2021-02-18 15:58 ` [PATCH v2 37/38] ppc: qemu: Move board directory from board/freescale to board/emulation Bin Meng
2021-02-22 9:18 ` Priyanka Jain
2021-02-18 15:58 ` [PATCH v2 38/38] doc: Add a reST document for qemu-ppce500 Bin Meng
2021-02-22 9:18 ` Priyanka Jain
2021-02-19 1:29 ` [PATCH v2 00/38] ppc: qemu: Convert qemu-ppce500 to driver model and enable additional driver support Bin Meng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210222140027.GT10169@bill-the-cat \
--to=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox