oeqa/runtime/multilib: add test for libc
PATCH 1/2 oeqa/runtime/multilib: add test for libc
Add a basic test to verify that /lib/libc.so.6 and /lib32/libc.so.6 have the right ELF class.
--- meta/lib/oeqa/runtime/multilib.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
meta/lib/oeqa/runtime/multilib.py +18 -1
@@ -20,8 +20,25 @@ class MultilibTest(oeRuntimeTest): else: self.fail("Cannot parse readelf output\n" + s) - @testcase('279') @skipUnlessPassed('test_ssh') + def test_check_multilib_libc(self): + """ + Check that a multilib image has both 32-bit and 64-bit libc in. + """ + + (status, output) = self.target.run("readelf -h /lib/libc.so.6") + self.assertEqual(status, 0, "Failed to readelf /lib/libc.so.6") + class32 = self.parse(output) + + (status, output) = self.target.run("readelf -h /lib64/libc.so.6") + self.assertEqual(status, 0, "Failed to readelf /lib64/libc.so.6") + class64 = self.parse(output) + + self.assertEqual(class32, "ELF32", msg="/lib/libc.so.6 isn't ELF32 (is %s)" % class32) + self.assertEqual(class64, "ELF64", msg="/lib64/libc.so.6 isn't ELF64 (is %s)" % class64) + + @testcase('279') + @skipUnlessPassed('test_check_multilib_libc') def test_file_connman(self): self.assertTrue(oeRuntimeTest.hasPackage('lib32-connman-gnome'), msg="This test assumes lib32-connman-gnome is installed")
Signature · 1 line
2.1.4
PATCH 2/2 oeqa/runtime/multilib: change test case to use glib-2.0-utils
Using connman-applet as a multilib test case seems quite heavy due to the numerous dependencies it has, whereas the same test ("do binaries get swapped correctly") can be done with a lower-level library containing binaries, for example glib-2.0.
--- meta/lib/oeqa/runtime/multilib.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
meta/lib/oeqa/runtime/multilib.py +5 -5
@@ -39,10 +39,10 @@ class MultilibTest(oeRuntimeTest): @testcase('279') @skipUnlessPassed('test_check_multilib_libc') - def test_file_connman(self): - self.assertTrue(oeRuntimeTest.hasPackage('lib32-connman-gnome'), msg="This test assumes lib32-connman-gnome is installed") + def test_file_glib(self): + self.assertTrue(oeRuntimeTest.hasPackage('lib32-libglib-2.0-utils'), msg="This test assumes lib32-libglib-2.0-utils is installed") - (status, output) = self.target.run("readelf -h /usr/bin/connman-applet") - self.assertEqual(status, 0, "Failed to readelf /usr/bin/connman-applet") + (status, output) = self.target.run("readelf -h /usr/bin/glib-genmarshal") + self.assertEqual(status, 0, "Failed to readelf /usr/bin/glib-genmarshal") theclass = self.parse(output) - self.assertEqual(theclass, "ELF32", msg="connman-applet isn't ELF32 (is %s)" % theclass) + self.assertEqual(theclass, "ELF32", msg="glib-genmarshal isn't ELF32 (is %s)" % theclass)
Signature · 1 line
2.1.4
Re: [PATCH 2/2] oeqa/runtime/multilib: change test case to use glib-2.0-utils
Quoted 6 lines · Ross Burton
Using connman-applet as a multilib test case seems quite heavy due to the numerous dependencies it has, whereas the same test ("do binaries get swapped
correctly") can be done with a lower-level library containing binaries, for example glib-2.0.
Updating the related bug made me realise that this would mean adding logic to the autobuilder to handle new and old tests, so it really isn't worth it.
Ross
Re: [PATCH 2/2] oeqa/runtime/multilib: change test case to use glib-2.0-utils
Quoted 10 lines · Ross
Quoted 6 lines · Ross Burton
Using connman-applet as a multilib test case seems quite heavy due to the numerous dependencies it has, whereas the same test ("do binaries get swapped
correctly") can be done with a lower-level library containing binaries, for
example glib-2.0.Updating the related bug made me realise that this would mean adding logic to the autobuilder to handle new and old tests, so it really isn't worth it.
Why is that? Really the autobuilder should just be running all valid tests for the image and not have any knowledge of what tests are being run.
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Re: [PATCH 2/2] oeqa/runtime/multilib: change test case to use glib-2.0-utils
Quoted 4 lines · Paul Eggleton
Why is that? Really the autobuilder should just be running all valid tests for
the image and not have any knowledge of what tests are being run.
Because the autobuilder needs to build specific images: the multilib runs build a core-image-sato but add IMAGE_INSTALL_append = " lib32-connman-gnome" to the auto.conf to get the right bits in.
Merging this would mean a version bump and the AB respecting the version as to what libraries it installs.
Ross