From: Peter Korsgaard <peter@korsgaard.com>
To: Julien Olivain <ju.o@free.fr>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] support/testing: add fping runtime test
Date: Mon, 05 Feb 2024 22:41:47 +0100 [thread overview]
Message-ID: <87fry6a8ro.fsf@48ers.dk> (raw)
In-Reply-To: <20240123215454.81191-1-ju.o@free.fr> (Julien Olivain's message of "Tue, 23 Jan 2024 22:54:54 +0100")
>>>>> "Julien" == Julien Olivain <ju.o@free.fr> writes:
> Signed-off-by: Julien Olivain <ju.o@free.fr>
> ---
> DEVELOPERS | 1 +
> support/testing/tests/package/test_fping.py | 45 +++++++++++++++++++++
> 2 files changed, 46 insertions(+)
> create mode 100644 support/testing/tests/package/test_fping.py
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 9528837dd0..fa760cb3ed 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -1769,6 +1769,7 @@ F: support/testing/tests/package/test_ddrescue/
> F: support/testing/tests/package/test_dos2unix.py
> F: support/testing/tests/package/test_fluidsynth.py
> F: support/testing/tests/package/test_fluidsynth/
> +F: support/testing/tests/package/test_fping.py
> F: support/testing/tests/package/test_gawk.py
> F: support/testing/tests/package/test_glslsandbox_player.py
> F: support/testing/tests/package/test_glslsandbox_player/
> diff --git a/support/testing/tests/package/test_fping.py b/support/testing/tests/package/test_fping.py
> new file mode 100644
> index 0000000000..58a1c92c0b
> --- /dev/null
> +++ b/support/testing/tests/package/test_fping.py
> @@ -0,0 +1,45 @@
> +import os
> +import time
> +
> +import infra.basetest
> +
> +
> +class TestFping(infra.basetest.BRTest):
> + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
> + """
> + BR2_PACKAGE_FPING=y
> + BR2_TARGET_ROOTFS_CPIO=y
> + # BR2_TARGET_ROOTFS_TAR is not set
> + """
> +
> + def test_run(self):
> + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
> + self.emulator.boot(arch="armv5",
> + kernel="builtin",
> + options=["-initrd", cpio_file])
> + self.emulator.login()
> +
> + # Check the program can execute.
> + self.assertRunOk("fping --version")
> +
> + # Fping v5.1 need to wait few seconds after a kernel booted
> + # before starting. This sleep time can be removed when the
> + # issue will be closed and the package updated. See:
> + # https://github.com/schweikert/fping/issues/288
> + time.sleep(5)
That's annoying, but indeed not much we can do about it. From the looks
of it, the fping code initializes the timestamp to zero (using calloc)
and then complains when (the delta from) CLOCK_REALTIME is less than
10s.
The only thing we could do better is to take timeout_multiplier into
consideration, so I multiplied with that and applied, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2024-02-05 21:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-23 21:54 [Buildroot] [PATCH 1/1] support/testing: add fping runtime test Julien Olivain
2024-02-05 21:41 ` Peter Korsgaard [this message]
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=87fry6a8ro.fsf@48ers.dk \
--to=peter@korsgaard.com \
--cc=buildroot@buildroot.org \
--cc=ju.o@free.fr \
/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