support/testing: TestPppd: force the baudrate for pppd

Since the ARM AArch64 toolchain toolchain bump [1], the TestPppd fail
at runtime since ttyppp0 and ttyppp1 interfaces were not created
properly:

    pppd[87]: pppd 2.5.2 started by root, uid 0
    pppd[87]: Baud rate for /dev/ttyppp1 is 0; need explicit baud rate

The new toolchain uses glibc 2.42 that include a rework in termios
"implement arbitrary and split speeds in termios" to support BOTHER
[2]. This rework seems to conflict with pppd workaround [3] introduced
when BOTHER was not supported in Glibc.

Fix this by setting the baudrate on pppd command line (we already set
this baudrate on socat command line).

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/14607335920 (TestPppd)

[1] 8d413d6179
[2] https://sourceware.org/git/?p=glibc.git;a=commit;h=5cf101a85aae0d703cdd8ed7b25fe288e41fdacb
[3] d65f6713c8

Fix-suggested-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit 50d772b66b)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
Romain Naour 2026-05-31 15:25:33 +02:00 committed by Thomas Perale
commit f4c69e4ff0

View file

@ -81,7 +81,7 @@ class TestPppd(infra.basetest.BRTest):
# We start our (fake) remote pppd instance, in our netns.
cmd = f"ip netns exec {namespace} "
cmd += f"pppd noauth ifname ppp1 {pty1} {remote_ip}:{local_ip}"
cmd += f"pppd noauth ifname ppp1 {pty1} 115200 {remote_ip}:{local_ip}"
self.assertRunOk(cmd)
# We wait a bit for the pppd to settle...
@ -89,7 +89,7 @@ class TestPppd(infra.basetest.BRTest):
# We start out local pppd instance, this time in the default
# network namespace.
cmd = f"pppd noauth ifname ppp0 {pty0} {local_ip}:{remote_ip}"
cmd = f"pppd noauth ifname ppp0 {pty0} 115200 {local_ip}:{remote_ip}"
self.assertRunOk(cmd)
# We wait again...