Skip to contentSkip to conversation

Analysis of runtime test failures

Buildroot Thomas Petazzoni via buildroot 3 participants 3 messages Feb 20, 2022

lore
Share & tools
lore
#0 lore raw

Hello,

Six of our runtime tests are failing, so I went ahead and quickly look at the error messages. Here is my summary:

=== tests.package.test_ipython.TestIPythonPy3 ===

https://gitlab.com/buildroot.org/buildroot/-/jobs/2088684091

Error is:

# ipython -c 'import math; math.floor(12.3)'
-sh: ipython: not found

=== tests.package.test_python_pyyaml.TestPythonPy3Pyyaml ===

https://gitlab.com/buildroot.org/buildroot/-/jobs/2088684091

Error is:

# python sample_python_pyyaml_dec.py
Traceback (most recent call last):
  File "/root/sample_python_pyyaml_dec.py", line 5, in <module>
    data = yaml.load(serialized)
TypeError: load() missing 1 required positional argument: 'Loader'

=== tests.package.test_luasyslog.TestLuaLuasyslog ===

https://gitlab.com/buildroot.org/buildroot/-/jobs/2088683903

Error is:

Quoted 1 line
Quoted 1 line
Quoted 1 line

luasyslog 2.2.0 Building

PATH="/builds/buildroot.org/buildroot/test-output/TestLuaLuasyslog/host/bin:/builds/buildroot.org/buildroot/test-output/TestLuaLuasyslog/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" /usr/bin/make -j33 -C /builds/buildroot.org/buildroot/test-output/TestLuaLuasyslog/build/luasyslog-2.2.0/ /usr/bin/make all-am
CC lsyslog.lo
CC compat-5.3.lo
In file included from lsyslog.c:11:
compat-5.3.h:402:4: error: #error "unsupported Lua version (i.e. not Lua 5.1, 5.2, or 5.3)"
# error "unsupported Lua version (i.e. not Lua 5.1, 5.2, or 5.3)"

    ^~~~~
In file included from compat-5.3.c:7:
compat-5.3.h:402:4: error: #error "unsupported Lua version (i.e. not Lua 5.1, 5.2, or 5.3)"
 #  error "unsupported Lua version (i.e. not Lua 5.1, 5.2, or 5.3)"
    ^~~~~

make[3]: *** [Makefile:710: lsyslog.lo] Error 1

=== tests.package.test_lxc.TestLxc ===

https://gitlab.com/buildroot.org/buildroot/-/jobs/2088683908

Error is:

# lxc-start -l trace -n lxc_iperf3 -o /tmp/lxc.log -L /tmp/lxc.console.log
lxc-start: lxc_iperf3: lxccontainer.c: wait_on_daemonized_start: 868 Received container state "ABORTING" instead of "RUNNING"
lxc-start: lxc_iperf3: tools/lxc_start.c: main: 306 The container failed to start
lxc-start: lxc_iperf3: tools/lxc_start.c: main: 309 To get more details, run the container in foreground mode
lxc-start: lxc_iperf3: tools/lxc_start.c: main: 312 Additional information can be obtained by setting the --logfile and --logpriority options
# echo $?

=== tests.package.test_rust.TestRustBin ===

https://gitlab.com/buildroot.org/buildroot/-/pipelines/470182758/failures

Build issue while building the example Rust application:

/usr/bin/ld: /tmp/tmpdggplkto-br2-testing-rust/hello-world/target/armv7-unknown-linux-gnueabihf/debug/deps/hello_world-e03f93fef10567c3.1ajq7aud2z9fxhe5.rcgu.o: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status

Could
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
be related ?

=== tests.package.test_rust.TestRust ===

Same error as above.

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Thomas,

Le 20/02/2022 à 17:02, Thomas Petazzoni via buildroot a écrit :

Quoted 5 lines

Hello,

Six of our runtime tests are failing, so I went ahead and quickly look at the error messages. Here is my summary:

Quoted 8 lines

=== tests.package.test_ipython.TestIPythonPy3 ===

https://gitlab.com/buildroot.org/buildroot/-/jobs/2088684091

Error is:

# ipython -c 'import math; math.floor(12.3)'
-sh: ipython: not found

ipython use a wrong shebang on the target:

# head -n 1 /usr/bin/ipython
#!/home/kubu/buildroot/testsuite-master/TestIPythonPy3/host/bin/python

The issue come from python3-setuptools 60.0.0 that changed SETUPTOOLS_USE_DISTUTILS [1]. This is actually a "breaking" change [2].

We have to override SETUPTOOLS_USE_DISTUTILS to the previous value "stdlib" to fixes the issue.

[1]
https://github.com/pypa/setuptools/commit/b6fcbbd00cb6d5607c9272dec452a50457bdb292
[2] https://github.com/pypa/setuptools/blob/v60.0.0/CHANGES.rst#breaking-changes

Quoted 5 lines

=== tests.package.test_python_pyyaml.TestPythonPy3Pyyaml ===

https://gitlab.com/buildroot.org/buildroot/-/jobs/2088684091

Quoted 7 lines

Error is:

# python sample_python_pyyaml_dec.py
Traceback (most recent call last):
  File "/root/sample_python_pyyaml_dec.py", line 5, in <module>
    data = yaml.load(serialized)
TypeError: load() missing 1 required positional argument: 'Loader'

"PyYAML 6.0 load() function requires Loader argument"
https://github.com/yaml/pyyaml/issues/576

"Warning: It is not safe to call yaml.load with any data received from an untrusted source! yaml.load is as powerful as pickle.load and so may call any Python function. Check the yaml.safe_load function though."

https://pyyaml.org/wiki/PyYAMLDocumentation

We can simply fixes the issue by using yaml.safe_load(serialized)

Quoted 15 lines

=== tests.package.test_luasyslog.TestLuaLuasyslog ===

https://gitlab.com/buildroot.org/buildroot/-/jobs/2088683903

Error is:

Quoted 1 line
Quoted 1 line
Quoted 1 line

luasyslog 2.2.0 Building

PATH="/builds/buildroot.org/buildroot/test-output/TestLuaLuasyslog/host/bin:/builds/buildroot.org/buildroot/test-output/TestLuaLuasyslog/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" /usr/bin/make -j33 -C /builds/buildroot.org/buildroot/test-output/TestLuaLuasyslog/build/luasyslog-2.2.0/ /usr/bin/make all-am
CC lsyslog.lo
CC compat-5.3.lo
In file included from lsyslog.c:11:
compat-5.3.h:402:4: error: #error "unsupported Lua version (i.e. not Lua 5.1, 5.2, or 5.3)"
# error "unsupported Lua version (i.e. not Lua 5.1, 5.2, or 5.3)"

Quoted 6 lines
    ^~~~~
In file included from compat-5.3.c:7:
compat-5.3.h:402:4: error: #error "unsupported Lua version (i.e. not Lua 5.1, 5.2, or 5.3)"
 #  error "unsupported Lua version (i.e. not Lua 5.1, 5.2, or 5.3)"
    ^~~~~

make[3]: *** [Makefile:710: lsyslog.lo] Error 1

Fixed by:

http://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

Quoted 5 lines

=== tests.package.test_lxc.TestLxc ===

https://gitlab.com/buildroot.org/buildroot/-/jobs/2088683908

Quoted 8 lines

Error is:

# lxc-start -l trace -n lxc_iperf3 -o /tmp/lxc.log -L /tmp/lxc.console.log
lxc-start: lxc_iperf3: lxccontainer.c: wait_on_daemonized_start: 868 Received container state "ABORTING" instead of "RUNNING"
lxc-start: lxc_iperf3: tools/lxc_start.c: main: 306 The container failed to start
lxc-start: lxc_iperf3: tools/lxc_start.c: main: 309 To get more details, run the container in foreground mode
lxc-start: lxc_iperf3: tools/lxc_start.c: main: 312 Additional information can be obtained by setting the --logfile and --logpriority options
# echo $?

See:
http://lists.busybox.net/pipermail/buildroot/2022-January/635251.html

We can upgrade the kernel used by the test but upstream added a regression while adding features in the stable branch 4.0.x

https://github.com/lxc/lxc/commit/be606e16fd0fa967219d890745a425625eafe251

Quoted 5 lines

=== tests.package.test_rust.TestRustBin ===

https://gitlab.com/buildroot.org/buildroot/-/pipelines/470182758/failures

Quoted 8 lines

Build issue while building the example Rust application:

/usr/bin/ld: /tmp/tmpdggplkto-br2-testing-rust/hello-world/target/armv7-unknown-linux-gnueabihf/debug/deps/hello_world-e03f93fef10567c3.1ajq7aud2z9fxhe5.rcgu.o: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status

Could
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
be related ?

I'm not sure, but the test doesn't use the cargo package infrastructure. I suggest to rework the test to use bat or ripgrep package.

Best regards,
Romain

Quoted 8 lines

=== tests.package.test_rust.TestRust ===

Same error as above.

Best regards,

Thomas

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
Quoted 26 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

Hello Thomas,
Le 20/02/2022 à 17:02, Thomas Petazzoni via buildroot a écrit :

Quoted 5 lines

Hello,

Six of our runtime tests are failing, so I went ahead and quickly look at the error messages. Here is my summary:

Quoted 8 lines

=== tests.package.test_ipython.TestIPythonPy3 ===

https://gitlab.com/buildroot.org/buildroot/-/jobs/2088684091

Error is:

# ipython -c 'import math; math.floor(12.3)'
-sh: ipython: not found

ipython use a wrong shebang on the target:

# head -n 1 /usr/bin/ipython
#!/home/kubu/buildroot/testsuite-master/TestIPythonPy3/host/bin/python

The issue come from python3-setuptools 60.0.0 that changed SETUPTOOLS_USE_DISTUTILS [1]. This is actually a "breaking" change [2].

Quoted 6 lines

We have to override SETUPTOOLS_USE_DISTUTILS to the previous value "stdlib" to fixes the issue.

[1]
https://github.com/pypa/setuptools/commit/b6fcbbd00cb6d5607c9272dec452a50457bdb292
[2] https://github.com/pypa/setuptools/blob/v60.0.0/CHANGES.rst#breaking-changes

This is then presumably something we want to do globally then? James, what do you say?

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot