Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Adam Duskett <adam.duskett@amarulasolutions.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 2/2] support/testing/tests/package/test_firewalld.py: new test
Date: Sat, 4 Nov 2023 15:28:37 +0100	[thread overview]
Message-ID: <20231104152837.0d43559a@windsurf> (raw)
In-Reply-To: <20231011092250.3739529-2-adam.duskett@amarulasolutions.com>

Hello Adam,

On Wed, 11 Oct 2023 11:22:50 +0200
Adam Duskett <adam.duskett@amarulasolutions.com> wrote:

> diff --git a/support/testing/tests/package/test_firewalld.py b/support/testing/tests/package/test_firewalld.py
> new file mode 100644
> index 0000000000..4b0282d3e4
> --- /dev/null
> +++ b/support/testing/tests/package/test_firewalld.py
> @@ -0,0 +1,94 @@
> +"""Test firewalld for both systemd and sysvinit."""
> +import os
> +import infra.basetest
> +
> +
> +class TestFirewalldSystemd(infra.basetest.BRTest):
> +    """Build the kernel as firewalld requires several the nftable options."""
> +
> +    __test__ = True

Are you sure this is needed?

> +    config: str = """

Please use:

	config = """

> +        BR2_arm=y
> +        BR2_cortex_a9=y
> +        BR2_ARM_ENABLE_VFP=y
> +        BR2_TOOLCHAIN_EXTERNAL=y
> +        BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
> +        BR2_PER_PACKAGE_DIRECTORIES=y

We typically don't user per-package directories for runtime tests. I
don't want to see a random set of runtime tests use PPD, and another
random set not use PPD.

> +    def test_run(self):
> +        cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
> +        kernel_file = os.path.join(self.builddir, "images", "zImage")
> +        dtb_file = os.path.join(self.builddir, "images", "vexpress-v2p-ca9.dtb")
> +        self.emulator.boot(arch="armv7",
> +                           kernel=kernel_file,
> +                           kernel_cmdline=["console=ttyAMA0,115200"],
> +                           options=[
> +                               "-initrd", cpio_file,
> +                               "-dtb", dtb_file,
> +                               "-M", "vexpress-a9"
> +                           ])
> +        # It takes quite some time for the system to boot with firewalld,
> +        self.emulator.timeout_multiplier *= 10

I don't think we should modify the timeout_multiplier. The
timeout_multiplier is meant to be provided on the command line, to
adjust for the slowness of the local machine.

Instead I would prefer that self.emulator.login() gets a timeout
argument to override the current value of 60 seconds.

support/testing/tests/init/test_systemd_selinux.py and
support/testing/tests/package/test_lxc.py should be fixed as well, as
they weak the timeout_multiplier.

Also support/testing/tests/package/test_python_django.py is wrong,
because it does:

        timeout = 35 * self.emulator.timeout_multiplier
[...]
        self.assertRunOk(cmd, timeout=timeout)

This gets re-multiplied by self.emulator.timeout_multiplier in
self.emulator.run().

Could you rework this?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-11-04 14:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11  9:22 [Buildroot] [PATCH 1/2] package/firewalld: enable missing kernel config options Adam Duskett
2023-10-11  9:22 ` [Buildroot] [PATCH 2/2] support/testing/tests/package/test_firewalld.py: new test Adam Duskett
2023-11-04 14:28   ` Thomas Petazzoni via buildroot [this message]
2023-11-04 14:23 ` [Buildroot] [PATCH 1/2] package/firewalld: enable missing kernel config options Thomas Petazzoni via buildroot

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=20231104152837.0d43559a@windsurf \
    --to=buildroot@buildroot.org \
    --cc=adam.duskett@amarulasolutions.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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