* [Buildroot] [PATCH 1/2] support/testing: TestPerlDBDmysql: use ext2 instead of cpio
@ 2024-04-30 20:47 Romain Naour
2024-04-30 20:47 ` [Buildroot] [PATCH 2/2] package/perl-dbd-mysql: fix runtime issue with MariaDB Romain Naour
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Romain Naour @ 2024-04-30 20:47 UTC (permalink / raw)
To: buildroot; +Cc: Romain Naour
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(+)
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")
--
2.44.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] package/perl-dbd-mysql: fix runtime issue with MariaDB
2024-04-30 20:47 [Buildroot] [PATCH 1/2] support/testing: TestPerlDBDmysql: use ext2 instead of cpio Romain Naour
@ 2024-04-30 20:47 ` Romain Naour
2024-05-27 13:14 ` Peter Korsgaard
2024-05-06 20:16 ` [Buildroot] [PATCH 1/2] support/testing: TestPerlDBDmysql: use ext2 instead of cpio Thomas Petazzoni via buildroot
2024-05-27 13:13 ` Peter Korsgaard
2 siblings, 1 reply; 5+ messages in thread
From: Romain Naour @ 2024-04-30 20:47 UTC (permalink / raw)
To: buildroot; +Cc: Romain Naour
Now that the TestPerlDBDmysql can be run normally, a new runtime issue
appear due to switch from oracle-mysql to MariaDB:
# perl -MDBI -e '1'
# echo $?
0
# perl -MDBD::mysql -e '1'
Can't load '/usr/lib/perl5/site_perl/5.38.2/arm-linux/auto/DBD/mysql/mysql.so'
for module DBD::mysql: /usr/lib/perl5/site_perl/5.38.2/arm-linux/auto/DBD/mysql/mysql.so:
undefined symbol: net_buffer_length at /usr/lib/perl5/5.38.2/arm-linux/DynaLoader.pm line 206.
This is fixed by an upstream commit [1] from 4.046_01 release.
[1] https://github.com/perl5-dbi/DBD-mysql/commit/0f0cebe87fab335873fd3701bc304922da826940
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/6735654506
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
...net_buffer_length-macro-if-available.patch | 41 +++++++++++++++++++
1 file changed, 41 insertions(+)
create mode 100644 package/perl-dbd-mysql/0001-Use-net_buffer_length-macro-if-available.patch
diff --git a/package/perl-dbd-mysql/0001-Use-net_buffer_length-macro-if-available.patch b/package/perl-dbd-mysql/0001-Use-net_buffer_length-macro-if-available.patch
new file mode 100644
index 0000000000..d7767c1f42
--- /dev/null
+++ b/package/perl-dbd-mysql/0001-Use-net_buffer_length-macro-if-available.patch
@@ -0,0 +1,41 @@
+From 9189ef77679c22de3bbd2142031858373236520b Mon Sep 17 00:00:00 2001
+From: Michiel Beijen <michiel.beijen@gmail.com>
+Date: Fri, 23 Feb 2018 07:52:33 +0000
+Subject: [PATCH] Use net_buffer_length macro if available
+
+Upstream: https://github.com/perl5-dbi/DBD-mysql/commit/0f0cebe87fab335873fd3701bc304922da826940
+
+(cherry picked from commit 0f0cebe87fab335873fd3701bc304922da826940)
+Signed-off-by: Romain Naour <romain.naour@smile.fr>
+---
+ mysql.xs | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/mysql.xs b/mysql.xs
+index 8edee55..9b4d60f 100644
+--- a/mysql.xs
++++ b/mysql.xs
+@@ -819,15 +819,14 @@ dbd_mysql_get_info(dbh, sql_info_type)
+ retsv = newSVpvn("`", 1);
+ break;
+ case SQL_MAXIMUM_STATEMENT_LENGTH:
+-#if !defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 50709
+- /* MariaDB 10 is not MySQL source level compatible so this
+- only applies to MySQL*/
+- /* mysql_get_option() was added in mysql 5.7.3 */
+- /* MYSQL_OPT_NET_BUFFER_LENGTH was added in mysql 5.7.9 */
++ /* net_buffer_length macro is not defined in MySQL 5.7 and some MariaDB
++ versions - if it is not available, use newer mysql_get_option */
++#if !defined(net_buffer_length)
++ ;
++ unsigned long buffer_len;
+ mysql_get_option(NULL, MYSQL_OPT_NET_BUFFER_LENGTH, &buffer_len);
+ retsv = newSViv(buffer_len);
+ #else
+- /* before mysql 5.7.9 use net_buffer_length macro */
+ retsv = newSViv(net_buffer_length);
+ #endif
+ break;
+--
+2.44.0
+
--
2.44.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH 1/2] support/testing: TestPerlDBDmysql: use ext2 instead of cpio
2024-04-30 20:47 [Buildroot] [PATCH 1/2] support/testing: TestPerlDBDmysql: use ext2 instead of cpio Romain Naour
2024-04-30 20:47 ` [Buildroot] [PATCH 2/2] package/perl-dbd-mysql: fix runtime issue with MariaDB Romain Naour
@ 2024-05-06 20:16 ` Thomas Petazzoni via buildroot
2024-05-27 13:13 ` Peter Korsgaard
2 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-05-06 20:16 UTC (permalink / raw)
To: Romain Naour; +Cc: buildroot
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
--
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] 5+ messages in thread
* Re: [Buildroot] [PATCH 1/2] support/testing: TestPerlDBDmysql: use ext2 instead of cpio
2024-04-30 20:47 [Buildroot] [PATCH 1/2] support/testing: TestPerlDBDmysql: use ext2 instead of cpio Romain Naour
2024-04-30 20:47 ` [Buildroot] [PATCH 2/2] package/perl-dbd-mysql: fix runtime issue with MariaDB Romain Naour
2024-05-06 20:16 ` [Buildroot] [PATCH 1/2] support/testing: TestPerlDBDmysql: use ext2 instead of cpio Thomas Petazzoni via buildroot
@ 2024-05-27 13:13 ` Peter Korsgaard
2 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2024-05-27 13:13 UTC (permalink / raw)
To: Romain Naour; +Cc: buildroot
>>>>> "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.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH 2/2] package/perl-dbd-mysql: fix runtime issue with MariaDB
2024-04-30 20:47 ` [Buildroot] [PATCH 2/2] package/perl-dbd-mysql: fix runtime issue with MariaDB Romain Naour
@ 2024-05-27 13:14 ` Peter Korsgaard
0 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2024-05-27 13:14 UTC (permalink / raw)
To: Romain Naour; +Cc: buildroot
>>>>> "Romain" == Romain Naour <romain.naour@smile.fr> writes:
> Now that the TestPerlDBDmysql can be run normally, a new runtime issue
> appear due to switch from oracle-mysql to MariaDB:
> # perl -MDBI -e '1'
> # echo $?
> 0
> # perl -MDBD::mysql -e '1'
> Can't load '/usr/lib/perl5/site_perl/5.38.2/arm-linux/auto/DBD/mysql/mysql.so'
> for module DBD::mysql: /usr/lib/perl5/site_perl/5.38.2/arm-linux/auto/DBD/mysql/mysql.so:
> undefined symbol: net_buffer_length at /usr/lib/perl5/5.38.2/arm-linux/DynaLoader.pm line 206.
> This is fixed by an upstream commit [1] from 4.046_01 release.
> [1] https://github.com/perl5-dbi/DBD-mysql/commit/0f0cebe87fab335873fd3701bc304922da826940
> Fixes:
> https://gitlab.com/buildroot.org/buildroot/-/jobs/6735654506
> Signed-off-by: Romain Naour <romain.naour@smile.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] 5+ messages in thread
end of thread, other threads:[~2024-05-27 13:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-30 20:47 [Buildroot] [PATCH 1/2] support/testing: TestPerlDBDmysql: use ext2 instead of cpio Romain Naour
2024-04-30 20:47 ` [Buildroot] [PATCH 2/2] package/perl-dbd-mysql: fix runtime issue with MariaDB Romain Naour
2024-05-27 13:14 ` Peter Korsgaard
2024-05-06 20:16 ` [Buildroot] [PATCH 1/2] support/testing: TestPerlDBDmysql: use ext2 instead of cpio Thomas Petazzoni via buildroot
2024-05-27 13:13 ` Peter Korsgaard
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.