All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] oeqa/runtime/multilib: add test for libc
@ 2015-08-28 23:43 Ross Burton
  2015-08-28 23:43 ` [PATCH 2/2] oeqa/runtime/multilib: change test case to use glib-2.0-utils Ross Burton
  0 siblings, 1 reply; 5+ messages in thread
From: Ross Burton @ 2015-08-28 23:43 UTC (permalink / raw)
  To: openembedded-core

Add a basic test to verify that /lib/libc.so.6 and /lib32/libc.so.6 have the
right ELF class.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/lib/oeqa/runtime/multilib.py | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/runtime/multilib.py b/meta/lib/oeqa/runtime/multilib.py
index 1c1729b..e1bcc42 100644
--- a/meta/lib/oeqa/runtime/multilib.py
+++ b/meta/lib/oeqa/runtime/multilib.py
@@ -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")
 
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-08-29 12:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-28 23:43 [PATCH 1/2] oeqa/runtime/multilib: add test for libc Ross Burton
2015-08-28 23:43 ` [PATCH 2/2] oeqa/runtime/multilib: change test case to use glib-2.0-utils Ross Burton
2015-08-28 23:54   ` Burton, Ross
2015-08-29 11:35     ` Paul Eggleton
2015-08-29 12:58       ` Burton, Ross

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.