From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: "Vincent Stehlé" <vincent.stehle@laposte.net>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] support/testing: add test for pixz
Date: Sun, 17 Jul 2022 00:01:36 +0200 [thread overview]
Message-ID: <20220716220136.GM2543@scaer> (raw)
In-Reply-To: <20220713172006.26411-1-vincent.stehle@laposte.net>
Vincent, All,
On 2022-07-13 19:20 +0200, Vincent Stehlé via buildroot spake thusly:
> Add a simple compress-uncompress test to verify that pixz is working.
>
> Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
>
>
> Hi,
>
> I have verified that this test works fine locally and on gitlab.
> Best regards,
>
> Vincent.
>
>
> DEVELOPERS | 1 +
> support/testing/tests/package/test_pixz.py | 40 ++++++++++++++++++++++
> 2 files changed, 41 insertions(+)
> create mode 100644 support/testing/tests/package/test_pixz.py
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 0afd697b6c..9a740d650d 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -2917,6 +2917,7 @@ F: configs/uevm5432_defconfig
> F: package/i7z/
> F: package/msr-tools/
> F: package/pixz/
> +F: support/testing/tests/package/test_pixz.py
>
> N: Vinicius Tinti <viniciustinti@gmail.com>
> F: package/python-thrift/
> diff --git a/support/testing/tests/package/test_pixz.py b/support/testing/tests/package/test_pixz.py
> new file mode 100644
> index 0000000000..eeff10eaa1
> --- /dev/null
> +++ b/support/testing/tests/package/test_pixz.py
> @@ -0,0 +1,40 @@
> +import os
> +
> +import infra.basetest
> +
> +
> +class TestPixz(infra.basetest.BRTest):
> + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
> + """
> + BR2_PACKAGE_PIXZ=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()
> +
> + # Prepare input file with random data and zeroes.
> + # We keep the size small (4 MB) for the sake of test time.
> + cmd = "dd if=/dev/urandom of=orig bs=1M count=2 && " \
> + "dd if=/dev/zero of=orig bs=1M count=2 seek=2"
> + self.assertRunOk(cmd)
> +
> + # Compress.
> + # We ask for 3 threads for good measure but with a very small file on a
> + # uniprocessor qemu this is only a light validation.
> + cmd = "cp -v orig compressed && pixz -p 3 compressed"
> + self.assertRunOk(cmd, timeout=60)
> +
> + # Uncompress.
> + cmd = "cp -v compressed.xz uncompressed.xz && pixz -d uncompressed.xz"
> + self.assertRunOk(cmd)
> +
> + # Verify.
> + # The ls is there for debugging.
> + cmd = "ls -l && cmp orig uncompressed"
> + self.assertRunOk(cmd)
> --
> 2.35.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2022-07-16 22:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-13 17:20 [Buildroot] [PATCH] support/testing: add test for pixz Vincent Stehlé via buildroot
2022-07-16 22:01 ` Yann E. MORIN [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=20220716220136.GM2543@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=vincent.stehle@laposte.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.