Skip to contentSkip to conversation

selftest: do not hardcode /tmp/sdk

PATCH In review Alexander Kanavin 2 participants 4 messages Jun 19, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 selftest: do not hardcode /tmp/sdk

This races if there are several copies of the test running at the same time.

[YOCTO #14438]

---
 meta/lib/oeqa/selftest/cases/runtime_test.py | 28 +++++++++-----------
 1 file changed, 12 insertions(+), 16 deletions(-)
meta/lib/oeqa/selftest/cases/runtime_test.py +12 -16
index 84c2cb77e8..d0c2440722 100644
@@ -14,11 +14,6 @@ from oeqa.core.decorator.data import skipIfNotQemu
 
 class TestExport(OESelftestTestCase):
 
-    @classmethod
-    def tearDownClass(cls):
-        runCmd("rm -rf /tmp/sdk")
-        super(TestExport, cls).tearDownClass()
-
     def test_testexport_basic(self):
         """
         Summary: Check basic testexport functionality with only ping test enabled.
@@ -95,19 +90,20 @@ class TestExport(OESelftestTestCase):
         msg = "Couldn't find SDK tarball: %s" % tarball_path
         self.assertEqual(os.path.isfile(tarball_path), True, msg)
 
-        # Extract SDK and run tar from SDK
-        result = runCmd("%s -y -d /tmp/sdk" % tarball_path)
-        self.assertEqual(0, result.status, "Couldn't extract SDK")
+        with tempfile.TemporaryDirectory() as tmpdirname:
+            # Extract SDK and run tar from SDK
+            result = runCmd("%s -y -d %s" % (tarball_path, tmpdirname))
+            self.assertEqual(0, result.status, "Couldn't extract SDK")
 
-        env_script = result.output.split()[-1]
-        result = runCmd(". %s; which tar" % env_script, shell=True)
-        self.assertEqual(0, result.status, "Couldn't setup SDK environment")
-        is_sdk_tar = True if "/tmp/sdk" in result.output else False
-        self.assertTrue(is_sdk_tar, "Couldn't setup SDK environment")
+            env_script = result.output.split()[-1]
+            result = runCmd(". %s; which tar" % env_script, shell=True)
+            self.assertEqual(0, result.status, "Couldn't setup SDK environment")
+            is_sdk_tar = True if tmpdirname in result.output else False
+            self.assertTrue(is_sdk_tar, "Couldn't setup SDK environment")
 
-        tar_sdk = result.output
-        result = runCmd("%s --version" % tar_sdk)
-        self.assertEqual(0, result.status, "Couldn't run tar from SDK")
+            tar_sdk = result.output
+            result = runCmd("%s --version" % tar_sdk)
+            self.assertEqual(0, result.status, "Couldn't run tar from SDK")
 
 
 class TestImage(OESelftestTestCase):
Signature · 1 line
2.31.1
#1 lore raw

PATCH 2/3 glibc: do not enable memory tagging on aarch64 just yet

Sadly, it seems to break copy-on-write as reported here:
https://lists.openembedded.org/g/openembedded-core/message/153082

---
 meta/recipes-core/glibc/glibc_2.33.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/glibc/glibc_2.33.bb +1 -1
index b70cd0978a..caa2e2ae18 100644
@@ -90,10 +90,10 @@ EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
 
 EXTRA_OECONF_append_x86 = " --enable-cet"
 EXTRA_OECONF_append_x86-64 = " --enable-cet"
-EXTRA_OECONF_append_aarch64 = " --enable-memory-tagging"
 
 PACKAGECONFIG ??= "nscd"
 PACKAGECONFIG[nscd] = "--enable-nscd,--disable-nscd"
+PACKAGECONFIG[memory-tagging] = "--enable-memory-tagging,--disable-memory-tagging"
 
 do_patch_append() {
     bb.build.exec_func('do_fix_readlib_c', d)
Signature · 1 line
2.31.1
#2 lore raw

Re: [OE-core] [PATCH 2/3] glibc: do not enable memory tagging on aarch64 just yet

Quoted 4 lines · Alexander Kanavin

Sadly, it seems to break copy-on-write as reported here:
https://lists.openembedded.org/g/openembedded-core/message/153082

looks ok thanks for the patch

Quoted 27 lines
---
 meta/recipes-core/glibc/glibc_2.33.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/glibc/glibc_2.33.bb +1 -2
index b70cd0978a..caa2e2ae18 100644
@@ -90,10 +90,10 @@ EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
 
 EXTRA_OECONF_append_x86 = " --enable-cet"
 EXTRA_OECONF_append_x86-64 = " --enable-cet"
-EXTRA_OECONF_append_aarch64 = " --enable-memory-tagging"
 
 PACKAGECONFIG ??= "nscd"
 PACKAGECONFIG[nscd] = "--enable-nscd,--disable-nscd"
+PACKAGECONFIG[memory-tagging] = "--enable-memory-tagging,--disable-memory-tagging"
 
 do_patch_append() {
     bb.build.exec_func('do_fix_readlib_c', d)
--

2.31.1

#3 lore raw

PATCH 3/3 mesa: enable gallium intel drivers when building for x86

In reply to Alexander Kanavin

Iris is the default, recommended option for Skylake and newer nowadays, i915 gallium is favoured over classic i915, and soon classic i965 will be replaced by crocus gallium driver for i965-to-Haswell GPUs.

---
 meta/recipes-graphics/mesa/mesa.inc       | 3 +++
 meta/recipes-graphics/mesa/mesa_21.1.2.bb | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)
meta/recipes-graphics/mesa/mesa.inc +3 -0
index 5700cc9673..b3c8c292ff 100644
@@ -131,6 +131,9 @@ PACKAGECONFIG[v3d] = ""
 GALLIUMDRIVERS = "swrast"
 # gallium swrast was found to crash Xorg on startup in x32 qemu
 GALLIUMDRIVERS_x86-x32 = ""
+# Add crocus when 21.2 is out to the list below to support the full range of Intel GPUs
+GALLIUMDRIVERS_append_x86_class-target = ",i915,iris"
+GALLIUMDRIVERS_append_x86-64_class-target = ",i915,iris"
 
 GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
 GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
meta/recipes-graphics/mesa/mesa_21.1.2.bb +2 -2
index 1993d6cbd0..28abc91a87 100644
@@ -1,5 +1,5 @@
 require ${BPN}.inc
 
-DRIDRIVERS_append_x86_class-target = ",r100,r200,nouveau,i965,i915"
-DRIDRIVERS_append_x86-64_class-target = ",r100,r200,nouveau,i965,i915"
+DRIDRIVERS_append_x86_class-target = ",r100,r200,nouveau,i965"
+DRIDRIVERS_append_x86-64_class-target = ",r100,r200,nouveau,i965"
 
Signature · 1 line
2.31.1