* [Buildroot] [PATCH 1/1] support/testing: add lrzsz runtime test
@ 2024-04-22 22:06 Julien Olivain
2024-05-09 16:22 ` Thomas Petazzoni via buildroot
2024-06-03 15:33 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Julien Olivain @ 2024-04-22 22:06 UTC (permalink / raw)
To: buildroot; +Cc: Julien Olivain
Signed-off-by: Julien Olivain <ju.o@free.fr>
---
DEVELOPERS | 1 +
support/testing/tests/package/test_lrzsz.py | 42 +++++++++++++++++++++
2 files changed, 43 insertions(+)
create mode 100644 support/testing/tests/package/test_lrzsz.py
diff --git a/DEVELOPERS b/DEVELOPERS
index 399b2931ff3..95842c28285 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1816,6 +1816,7 @@ F: support/testing/tests/package/test_libcamera/
F: support/testing/tests/package/test_libgpgme.py
F: support/testing/tests/package/test_libjxl.py
F: support/testing/tests/package/test_lrzip.py
+F: support/testing/tests/package/test_lrzsz.py
F: support/testing/tests/package/test_ltrace.py
F: support/testing/tests/package/test_lvm2.py
F: support/testing/tests/package/test_lvm2/
diff --git a/support/testing/tests/package/test_lrzsz.py b/support/testing/tests/package/test_lrzsz.py
new file mode 100644
index 00000000000..23b4cdc531f
--- /dev/null
+++ b/support/testing/tests/package/test_lrzsz.py
@@ -0,0 +1,42 @@
+import os
+
+import infra.basetest
+
+
+class TestLrzsz(infra.basetest.BRTest):
+ config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+ """
+ BR2_PACKAGE_LRZSZ=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()
+
+ fifo = "/tmp/return-fifo"
+ data_fname = "data"
+ data_path = f"/tmp/{data_fname}"
+
+ # We check a program can execute.
+ self.assertRunOk("sz --version")
+
+ # We create a data file, to be transferred.
+ cmd = f"dd if=/dev/urandom of={data_path} bs=1M count=1"
+ self.assertRunOk(cmd)
+
+ # We create a fifo, used as a return fifo.
+ self.assertRunOk(f"mkfifo {fifo}")
+
+ # We transfer the test data using ZMODEM over the pipe and our
+ # return fifo.
+ self.assertRunOk(f"sz {data_path} < {fifo} | rz > {fifo}")
+
+ # The rz command is supposed to have created the received file
+ # in the current directory. We expect the received data to be
+ # the same as the original input file.
+ self.assertRunOk(f"cmp {data_path} {data_fname}")
--
2.44.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] support/testing: add lrzsz runtime test
2024-04-22 22:06 [Buildroot] [PATCH 1/1] support/testing: add lrzsz runtime test Julien Olivain
@ 2024-05-09 16:22 ` Thomas Petazzoni via buildroot
2024-06-03 15:33 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-05-09 16:22 UTC (permalink / raw)
To: Julien Olivain; +Cc: buildroot
On Tue, 23 Apr 2024 00:06:32 +0200
Julien Olivain <ju.o@free.fr> wrote:
> Signed-off-by: Julien Olivain <ju.o@free.fr>
> ---
> DEVELOPERS | 1 +
> support/testing/tests/package/test_lrzsz.py | 42 +++++++++++++++++++++
> 2 files changed, 43 insertions(+)
> create mode 100644 support/testing/tests/package/test_lrzsz.py
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] support/testing: add lrzsz runtime test
2024-04-22 22:06 [Buildroot] [PATCH 1/1] support/testing: add lrzsz runtime test Julien Olivain
2024-05-09 16:22 ` Thomas Petazzoni via buildroot
@ 2024-06-03 15:33 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-06-03 15:33 UTC (permalink / raw)
To: Julien Olivain; +Cc: buildroot
>>>>> "Julien" == Julien Olivain <ju.o@free.fr> writes:
> Signed-off-by: Julien Olivain <ju.o@free.fr>
Committed to 2024.02.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-03 15:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-22 22:06 [Buildroot] [PATCH 1/1] support/testing: add lrzsz runtime test Julien Olivain
2024-05-09 16:22 ` Thomas Petazzoni via buildroot
2024-06-03 15:33 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox