diff mbox series

[1/2] support/testing: TestPerlDBDmysql: use ext2 instead of cpio

Message ID 20240430204744.1014238-1-romain.naour@smile.fr
State Accepted
Headers show
Series [1/2] support/testing: TestPerlDBDmysql: use ext2 instead of cpio | expand

Commit Message

Romain Naour April 30, 2024, 8:47 p.m. UTC
The CPIO filesystem generated by TestPerlDBDmysql is too large, and
doesn't fit as an initramfs in the 256MB of RAM available in the
versatilepb machine. This causes a failure while running a basic
test "perl -MDBI -e '1'" since "/usr/lib/perl5", and many files
being missing from the root filesystem, ultimately causing the test
to fail.

Can't locate DBI.pm in @INC (you may need to install the DBI module)
(@INC entries checked: /usr/lib/perl5/site_perl/5.38.2/arm-linux
/usr/lib/perl5/site_perl/5.38.2 /usr/lib/perl5/5.38.2/arm-linux
/usr/lib/perl5/5.38.2).

It would make sense to switch all test cases to use ext2 + a
hard-drive, but for now, let's fix the few test cases that are causing
problems.

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/6735654506

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 support/testing/tests/package/test_perl_dbd_mysql.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Thomas Petazzoni May 6, 2024, 8:16 p.m. UTC | #1
On Tue, 30 Apr 2024 22:47:43 +0200
Romain Naour <romain.naour@smile.fr> wrote:

> The CPIO filesystem generated by TestPerlDBDmysql is too large, and
> doesn't fit as an initramfs in the 256MB of RAM available in the
> versatilepb machine. This causes a failure while running a basic
> test "perl -MDBI -e '1'" since "/usr/lib/perl5", and many files
> being missing from the root filesystem, ultimately causing the test
> to fail.
> 
> Can't locate DBI.pm in @INC (you may need to install the DBI module)
> (@INC entries checked: /usr/lib/perl5/site_perl/5.38.2/arm-linux
> /usr/lib/perl5/site_perl/5.38.2 /usr/lib/perl5/5.38.2/arm-linux
> /usr/lib/perl5/5.38.2).
> 
> It would make sense to switch all test cases to use ext2 + a
> hard-drive, but for now, let's fix the few test cases that are causing
> problems.
> 
> Fixes:
> https://gitlab.com/buildroot.org/buildroot/-/jobs/6735654506
> 
> Signed-off-by: Romain Naour <romain.naour@smile.fr>
> ---
>  support/testing/tests/package/test_perl_dbd_mysql.py | 11 +++++++++++
>  1 file changed, 11 insertions(+)

Both applied, thanks a lot!

Thomas
Peter Korsgaard May 27, 2024, 1:13 p.m. UTC | #2
>>>>> "Romain" == Romain Naour <romain.naour@smile.fr> writes:

 > The CPIO filesystem generated by TestPerlDBDmysql is too large, and
 > doesn't fit as an initramfs in the 256MB of RAM available in the
 > versatilepb machine. This causes a failure while running a basic
 > test "perl -MDBI -e '1'" since "/usr/lib/perl5", and many files
 > being missing from the root filesystem, ultimately causing the test
 > to fail.

 > Can't locate DBI.pm in @INC (you may need to install the DBI module)
 > (@INC entries checked: /usr/lib/perl5/site_perl/5.38.2/arm-linux
 > /usr/lib/perl5/site_perl/5.38.2 /usr/lib/perl5/5.38.2/arm-linux
 > /usr/lib/perl5/5.38.2).

 > It would make sense to switch all test cases to use ext2 + a
 > hard-drive, but for now, let's fix the few test cases that are causing
 > problems.

 > Fixes:
 > https://gitlab.com/buildroot.org/buildroot/-/jobs/6735654506

 > Signed-off-by: Romain Naour <romain.naour@smile.fr>

Committed to 2024.02.x, thanks.
diff mbox series

Patch

diff --git a/support/testing/tests/package/test_perl_dbd_mysql.py b/support/testing/tests/package/test_perl_dbd_mysql.py
index f8fe832b41..93551b420f 100644
--- a/support/testing/tests/package/test_perl_dbd_mysql.py
+++ b/support/testing/tests/package/test_perl_dbd_mysql.py
@@ -1,4 +1,5 @@ 
 from tests.package.test_perl import TestPerlBase
+import os
 
 
 class TestPerlDBDmysql(TestPerlBase):
@@ -13,8 +14,18 @@  class TestPerlDBDmysql(TestPerlBase):
         """
         BR2_PACKAGE_PERL=y
         BR2_PACKAGE_PERL_DBD_MYSQL=y
+        BR2_TARGET_ROOTFS_EXT2=y
+        BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
         """
 
+    def login(self):
+        ext2_file = os.path.join(self.builddir, "images", "rootfs.ext2")
+        self.emulator.boot(arch="armv5",
+                           kernel="builtin",
+                           options=["-drive", "file=%s,if=scsi,format=raw" % ext2_file],
+                           kernel_cmdline=["rootwait", "root=/dev/sda"])
+        self.emulator.login()
+
     def test_run(self):
         self.login()
         self.module_test("DBI")