support/testing: make treq tests to ignore warning
PATCH 1/4 support/testing: make treq tests to ignore warning
Newer versions of python-treq display a warning at runtime when service_identity is not installed:
"Without the service_identity module, Twisted can perform only rudimentary TLS client hostname verification."
This warning message confuses the test that looks for another string in stdout. Make the test ignore other messages while still expecting "Connection refused".
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/269139449
https://gitlab.com/buildroot.org/buildroot/-/jobs/269139450
---
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/270022950
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/270022951
--- support/testing/tests/package/test_python_treq.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
support/testing/tests/package/test_python_treq.py +2 -1
@@ -7,7 +7,8 @@ class TestPythonTreq(TestPythonPackageBase): def run_sample_scripts(self): cmd = self.interpreter + " sample_python_treq.py" output, exit_code = self.emulator.run(cmd, timeout=20) - self.assertIn("Connection refused", output[0]) + refuse_msgs = [1 for l in output if "Connection refused" in l] + self.assertGreater(sum(refuse_msgs), 0) self.assertEqual(exit_code, 0)
Signature · 1 line
2.17.1
PATCH 2/4 support/testing: make crossbar to use umsgpack
Since version 19.3.3, python-autobahn assumes that when CPython is used msgpack will be used as well [1]. But it still allows the user to override this behavior by setting an environment variable [2] to use umsgpack.
Make the test to explicitly use umsgpack since it is part of the minimal config (python-crossbar selects python-u-msgpack).
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/269139430
[1] https://github.com/crossbario/autobahn-python/commit/ea019b80427c9f6d43938631f8143bf7c993b4e7
[2] https://github.com/crossbario/autobahn-python/commit/fe70ceebe04849470b0c81b26ff6e65e709b0d33
---
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/270022934
--- support/testing/tests/package/sample_python_crossbar.py | 2 ++ 1 file changed, 2 insertions(+)
support/testing/tests/package/sample_python_crossbar.py +2 -0
@@ -1,3 +1,5 @@ +import os import crossbar +os.environ["AUTOBAHN_USE_UMSGPACK"] = "1" crossbar.run(["version"])
Signature · 1 line
2.17.1
PATCH 3/4 support/testing: provide entropy to lua tests
In reply to Ricardo MartincoskiNewer versions of lua-http require entropy.
Switch to use armv5 builtin kernel that already provides entropy for all lua tests.
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/269139374
https://gitlab.com/buildroot.org/buildroot/-/jobs/269139376
---
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/270022884
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/270022885
full run:
https://gitlab.com/RicardoMartincoski/buildroot/pipelines/75770319
--- support/testing/tests/package/test_lua.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
support/testing/tests/package/test_lua.py +1 -1
@@ -12,7 +12,7 @@ class TestLuaBase(infra.basetest.BRTest): def login(self): cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") - self.emulator.boot(arch="armv7", + self.emulator.boot(arch="armv5", kernel="builtin", options=["-initrd", cpio_file]) self.emulator.login()
Signature · 1 line
2.17.1
PATCH 4/4 support/testing: provide entropy to perl tests
In reply to Ricardo MartincoskiNewer versions of perl-io-socket-ssl require entropy.
Switch to use armv5 builtin kernel that already provides entropy for all perl tests.
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/269139402
---
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/270022909
full run:
https://gitlab.com/RicardoMartincoski/buildroot/pipelines/75770319
--- support/testing/tests/package/test_perl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
support/testing/tests/package/test_perl.py +1 -1
@@ -12,7 +12,7 @@ class TestPerlBase(infra.basetest.BRTest): def login(self): cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") - self.emulator.boot(arch="armv7", + self.emulator.boot(arch="armv5", kernel="builtin", options=["-initrd", cpio_file]) self.emulator.login()
Signature · 1 line
2.17.1
PATCH 1/4 support/testing: make treq tests to ignore warning
In reply to Ricardo MartincoskiHello Ricardo,
Quoted 16 lines · On Sat, 10 Aug 2019 22:35:35 -0300 Ricardo Martincoski…
Newer versions of python-treq display a warning at runtime when
service_identityis not installed:
"Without theservice_identitymodule, Twisted can perform only rudimentary TLS client hostname verification."This warning message confuses the test that looks for another string in stdout. Make the test ignore other messages while still expecting "Connection refused".
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/269139449
https://gitlab.com/buildroot.org/buildroot/-/jobs/269139450Signed-off-by Ricardo Martincoski <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Yegor Yefremov <[email protected]>
Quoted 6 lines
---
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/270022950
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/270022951--- support/testing/tests/package/test_python_treq.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Series applied, thanks! Thanks a lot for coming back so quickly with fixes for those runtime test issues!
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com