Skip to contentSkip to conversation

core-image-weston: add sdk/ptest images

RFC PATCH New Alexander Kanavin 1 participant 7 messages Mar 12, 2021

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/7 core-image-weston: add sdk/ptest images

This is the first step towards rebasing the AB matrix from sato to weston; the eventual goal is to keep sato only in core-image-sato image.

The broader rationale is that X11 is effectively deprecated technology at this point with only minimal maintenance; standalone X server will not be developed any further, and all attention currently is towards making it work well under Wayland.

I believe YP should be defaulting to Wayland and not X11.

---
 meta/conf/distro/include/maintainers.inc      |  3 +++
 .../images/core-image-weston-ptest-all.bb     | 21 +++++++++++++++++++
 .../images/core-image-weston-ptest-fast.bb    | 20 ++++++++++++++++++
 .../images/core-image-weston-sdk.bb           | 11 ++++++++++
 4 files changed, 55 insertions(+)
 create mode 100644 meta/recipes-graphics/images/core-image-weston-ptest-all.bb
 create mode 100644 meta/recipes-graphics/images/core-image-weston-ptest-fast.bb
 create mode 100644 meta/recipes-graphics/images/core-image-weston-sdk.bb
meta/conf/distro/include/maintainers.inc +3 -0
index 9093f2d7fd..eafbd5e56a 100644
@@ -117,6 +117,9 @@ RECIPE_MAINTAINER_pn-core-image-testmaster-initramfs = "Richard Purdie <richard.
 RECIPE_MAINTAINER_pn-core-image-testmaster = "Richard Purdie <[email protected]>"
 RECIPE_MAINTAINER_pn-core-image-clutter = "Richard Purdie <[email protected]>"
 RECIPE_MAINTAINER_pn-core-image-weston = "Richard Purdie <[email protected]>"
+RECIPE_MAINTAINER_pn-core-image-weston-ptest-all = "Richard Purdie <[email protected]>"
+RECIPE_MAINTAINER_pn-core-image-weston-ptest-fast = "Richard Purdie <[email protected]>"
+RECIPE_MAINTAINER_pn-core-image-weston-sdk = "Richard Purdie <[email protected]>"
 RECIPE_MAINTAINER_pn-core-image-x11 = "Richard Purdie <[email protected]>"
 RECIPE_MAINTAINER_pn-core-image-sato-dev = "Richard Purdie <[email protected]>"
 RECIPE_MAINTAINER_pn-core-image-sato-ptest-fast = "Richard Purdie <[email protected]>"
meta/recipes-graphics/images/core-image-weston-ptest-all.bb new file +21 -0
new file mode 100644
index 0000000000..a622779e6a
@@ -0,0 +1,21 @@
+require core-image-weston-sdk.bb
+require conf/distro/include/ptest-packagelists.inc
+
+DESCRIPTION += "Also includes ptest packages."
+
+# Include the full set of ptests
+IMAGE_INSTALL += "${PTESTS_FAST} ${PTESTS_SLOW}"
+
+# This image is sufficiently large (~1.8GB) that we need to be careful that it fits in a live
+# image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the
+# box) and explicitly add just 1100MB.
+# strace-ptest in particular needs more than 500MB
+IMAGE_OVERHEAD_FACTOR = "1.0"
+IMAGE_ROOTFS_EXTRA_SPACE = "1124288"
+
+# ptests need more memory than standard to avoid the OOM killer
+# also lttng-tools needs /tmp that has at least 1G
+QB_MEM = "-m 2048"
+
+# Sadly at the moment the full set of ptests is not robust enough and sporadically fails in random places
+PTEST_EXPECT_FAILURE = "1"
meta/recipes-graphics/images/core-image-weston-ptest-fast.bb new file +20 -0
new file mode 100644
index 0000000000..df02befb66
@@ -0,0 +1,20 @@
+require core-image-weston-sdk.bb
+require conf/distro/include/ptest-packagelists.inc
+
+# Include only fast (< 30 sec) ptests
+IMAGE_INSTALL += "${PTESTS_FAST}"
+
+DESCRIPTION += "Also includes ptest packages with fast execution times to allow for more automated QA."
+
+# This image is sufficiently large (~1.8GB) that it can't actually fit in a live
+# image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the
+# box) and explicitly add just 1500MB.
+# strace-ptest in particular needs more than 500MB
+IMAGE_OVERHEAD_FACTOR = "1.0"
+IMAGE_ROOTFS_EXTRA_SPACE = "1524288"
+
+# ptests need more memory than standard to avoid the OOM killer
+QB_MEM = "-m 1024"
+
+# Sadly at the moment the fast set of ptests is not robust enough and sporadically fails in a couple of places
+PTEST_EXPECT_FAILURE = "1"
meta/recipes-graphics/images/core-image-weston-sdk.bb new file +11 -0
new file mode 100644
index 0000000000..f5f7dade54
@@ -0,0 +1,11 @@
+require core-image-weston.bb
+
+DESCRIPTION = "Image with Weston support that includes everything within \
+core-image-weston plus meta-toolchain, development headers and libraries to \
+form a standalone SDK."
+
+IMAGE_FEATURES += "dev-pkgs tools-sdk \
+	tools-debug eclipse-debug tools-profile tools-testapps debug-tweaks ssh-server-openssh"
+
+IMAGE_INSTALL += "kernel-devsrc"
+
Signature · 1 line
2.29.2
#1 lore raw

RFC PATCH 2/7 oeqa/buildperf: use weston image instead of sato

---
 meta/lib/oeqa/buildperf/test_basic.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
meta/lib/oeqa/buildperf/test_basic.py +7 -7
index 2104617ba3..0fe7d3c8dc 100644
@@ -11,10 +11,10 @@ from oeqa.buildperf import BuildPerfTestCase
 from oeqa.utils.commands import get_bb_var, get_bb_vars
 
 class Test1P1(BuildPerfTestCase):
-    build_target = 'core-image-sato'
+    build_target = 'core-image-weston'
 
     def test1(self):
-        """Build core-image-sato"""
+        """Build core-image-weston"""
         self.rm_tmp()
         self.rm_sstate()
         self.rm_cache()
@@ -40,10 +40,10 @@ class Test1P2(BuildPerfTestCase):
 
 
 class Test1P3(BuildPerfTestCase):
-    build_target = 'core-image-sato'
+    build_target = 'core-image-weston'
 
     def test13(self):
-        """Build core-image-sato with rm_work enabled"""
+        """Build core-image-weston with rm_work enabled"""
         postfile = os.path.join(self.tmp_dir, 'postfile.conf')
         with open(postfile, 'w') as fobj:
             fobj.write('INHERIT += "rm_work"\n')
@@ -60,10 +60,10 @@ class Test1P3(BuildPerfTestCase):
 
 
 class Test2(BuildPerfTestCase):
-    build_target = 'core-image-sato'
+    build_target = 'core-image-weston'
 
     def test2(self):
-        """Run core-image-sato do_rootfs with sstate"""
+        """Run core-image-weston do_rootfs with sstate"""
         # Build once in order to populate sstate cache
         self.run_cmd(['bitbake', self.build_target])
 
@@ -93,7 +93,7 @@ class Test3(BuildPerfTestCase):
 
 
 class Test4(BuildPerfTestCase):
-    build_target = 'core-image-sato'
+    build_target = 'core-image-weston'
 
     def test4(self):
         """eSDK metrics"""
Signature · 1 line
2.29.2
#2 lore raw

RFC PATCH 3/7 oeqa/core/tests/test_data.py: use weston image instead of sato

In reply to Alexander Kanavin
---
 meta/lib/oeqa/core/tests/test_data.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/core/tests/test_data.py +1 -1
index ac74098b78..acd726f3a0 100755
@@ -33,7 +33,7 @@ class TestData(TestBase):
 
     def test_data_fail_wrong_variable(self):
         expectedError = 'AssertionError'
-        d = {'IMAGE' : 'core-image-sato', 'ARCH' : 'arm'}
+        d = {'IMAGE' : 'core-image-weston', 'ARCH' : 'arm'}
 
         tc = self._testLoader(d=d, modules=self.modules)
         results = tc.runTests()
Signature · 1 line
2.29.2
#3 lore raw

RFC PATCH 4/7 oeqa/selftest: transition to weston images

In reply to Alexander Kanavin

For readonly rootfs tests core-image-weston
is appended; everywhere else it replaces core-image-sato.

---
 meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py |  4 ++--
 meta/lib/oeqa/selftest/cases/buildoptions.py        |  4 ++--
 meta/lib/oeqa/selftest/cases/imagefeatures.py       |  6 +++---
 meta/lib/oeqa/selftest/cases/runtime_test.py        |  2 --
 meta/lib/oeqa/selftest/cases/sstatetests.py         | 10 +++++-----
 5 files changed, 12 insertions(+), 14 deletions(-)
meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py +2 -2
index f7c356ad09..7ac03f0cec 100644
@@ -90,7 +90,7 @@ class RebuildFromSState(SStateBase):
         self.assertFalse(failed_cleansstate, msg="The following recipes have failed cleansstate(all others have passed both cleansstate and rebuild from sstate tests): %s" % ' '.join(map(str, failed_cleansstate)))
 
     def test_sstate_relocation(self):
-        self.run_test_sstate_rebuild(['core-image-sato-sdk'], relocate=True, rebuild_dependencies=True)
+        self.run_test_sstate_rebuild(['core-image-weston-sdk'], relocate=True, rebuild_dependencies=True)
 
     def test_sstate_rebuild(self):
-        self.run_test_sstate_rebuild(['core-image-sato-sdk'], relocate=False, rebuild_dependencies=True)
+        self.run_test_sstate_rebuild(['core-image-weston-sdk'], relocate=False, rebuild_dependencies=True)
meta/lib/oeqa/selftest/cases/buildoptions.py +2 -2
index 20fe8ed8f6..c29af86c4b 100644
@@ -50,9 +50,9 @@ class ImageOptionsTests(OESelftestTestCase):
     def test_read_only_image(self):
         distro_features = get_bb_var('DISTRO_FEATURES')
         if not ('x11' in distro_features and 'opengl' in distro_features):
-            self.skipTest('core-image-sato requires x11 and opengl in distro features')
+            self.skipTest('core-image-sato/weston requires x11 and opengl in distro features')
         self.write_config('IMAGE_FEATURES += "read-only-rootfs"')
-        bitbake("core-image-sato")
+        bitbake("core-image-sato core-image-weston")
         # do_image will fail if there are any pending postinsts
 
 class DiskMonTest(OESelftestTestCase):
meta/lib/oeqa/selftest/cases/imagefeatures.py +3 -3
index 6723a8198f..5d4330b48f 100644
@@ -240,8 +240,8 @@ USERADD_GID_TABLES += "files/static-group"
 
     def test_no_busybox_base_utils(self):
         config = """
-# Enable x11
-DISTRO_FEATURES_append += "x11"
+# Enable wayland
+DISTRO_FEATURES_append += "pam opengl wayland"
 
 # Switch to systemd
 DISTRO_FEATURES += "systemd"
@@ -262,7 +262,7 @@ PNBLACKLIST[busybox] = "Don't build this"
 """
         self.write_config(config)
 
-        bitbake("--graphviz core-image-sato")
+        bitbake("--graphviz core-image-weston")
 
     def test_image_gen_debugfs(self):
         """
meta/lib/oeqa/selftest/cases/runtime_test.py +0 -2
index b20c5b427b..84c2cb77e8 100644
@@ -128,7 +128,6 @@ class TestImage(OESelftestTestCase):
         features += 'TEST_SUITES = "ping ssh selftest"\n'
         self.write_config(features)
 
-        # Build core-image-sato and testimage
         bitbake('core-image-full-cmdline socat')
         bitbake('-c testimage core-image-full-cmdline')
 
@@ -164,7 +163,6 @@ class TestImage(OESelftestTestCase):
         features += 'PSEUDO_IGNORE_PATHS .= ",%s"\n' % self.gpg_home
         self.write_config(features)
 
-        # Build core-image-sato and testimage
         bitbake('core-image-full-cmdline socat')
         bitbake('-c testimage core-image-full-cmdline')
 
meta/lib/oeqa/selftest/cases/sstatetests.py +5 -5
index c46e8ba489..9db2a0bb44 100644
@@ -261,7 +261,7 @@ PACKAGE_CLASSES = "package_rpm package_ipk package_deb"
 BB_SIGNATURE_HANDLER = "OEBasicHash"
 """)
         self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash")
-        bitbake("core-image-sato -S none")
+        bitbake("core-image-weston -S none")
         self.write_config("""
 MACHINE = "qemux86"
 TMPDIR = "${TOPDIR}/tmp-sstatesamehash2"
@@ -273,12 +273,12 @@ PACKAGE_CLASSES = "package_rpm package_ipk package_deb"
 BB_SIGNATURE_HANDLER = "OEBasicHash"
 """)
         self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash2")
-        bitbake("core-image-sato -S none")
+        bitbake("core-image-weston -S none")
 
         def get_files(d):
             f = []
             for root, dirs, files in os.walk(d):
-                if "core-image-sato" in root:
+                if "core-image-weston" in root:
                     # SDKMACHINE changing will change
                     # do_rootfs/do_testimage/do_build stamps of images which
                     # is safe to ignore.
@@ -306,7 +306,7 @@ NATIVELSBSTRING = \"DistroA\"
 BB_SIGNATURE_HANDLER = "OEBasicHash"
 """)
         self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash")
-        bitbake("core-image-sato -S none")
+        bitbake("core-image-weston -S none")
         self.write_config("""
 TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\"
 TCLIBCAPPEND = \"\"
@@ -314,7 +314,7 @@ NATIVELSBSTRING = \"DistroB\"
 BB_SIGNATURE_HANDLER = "OEBasicHash"
 """)
         self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash2")
-        bitbake("core-image-sato -S none")
+        bitbake("core-image-weston -S none")
 
         def get_files(d):
             f = []
Signature · 1 line
2.29.2
#4 lore raw

RFC PATCH 5/7 core-image-multilib-example: base on weston, and not sato

In reply to Alexander Kanavin
---
 .../recipes-multilib/images/core-image-multilib-example.bb      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-skeleton/recipes-multilib/images/core-image-multilib-example.bb +1 -1
index e7d50aefda..1290968b9d 100644
@@ -6,7 +6,7 @@ SUMMARY = "An example of a multilib image"
 #
 
 # First include a base image to base things off
-require recipes-sato/images/core-image-sato.bb
+require recipes-graphics/images/core-image-weston.bb
 
 # Now add the multilib packages we want to install
 IMAGE_INSTALL += "lib32-bash"
Signature · 1 line
2.29.2
#5 lore raw

RFC PATCH 6/7 default-distrovars.inc: add wayland/opengl to default distro features

In reply to Alexander Kanavin

This puts them on equal terms with x11 distro feature (which I think is due).

---
 meta/conf/distro/include/default-distrovars.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/distro/include/default-distrovars.inc +1 -1
index 433d4b6651..0927e9c0ad 100644
@@ -10,7 +10,7 @@ LOCALE_UTF8_ONLY ?= "0"
 LOCALE_UTF8_IS_DEFAULT ?= "1"
 LOCALE_UTF8_IS_DEFAULT_class-nativesdk = "0"
 
-DISTRO_FEATURES_DEFAULT ?= "acl alsa argp bluetooth ext2 ipv4 ipv6 largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 vfat"
+DISTRO_FEATURES_DEFAULT ?= "acl alsa argp bluetooth ext2 ipv4 ipv6 largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 vfat wayland opengl"
 DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT}"
 IMAGE_FEATURES ?= ""
 
Signature · 1 line
2.29.2
#6 lore raw

RFC PATCH 7/7 poky.conf: remove wayland/opengl from distro features, as it is now oe-core default

In reply to Alexander Kanavin
---
 meta-poky/conf/distro/poky.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-poky/conf/distro/poky.conf +1 -1
index 4e416c0c85..24e046c60a 100644
@@ -13,7 +13,7 @@ TARGET_VENDOR = "-poky"
 LOCALCONF_VERSION = "1"
 
 # Override these in poky based distros
-POKY_DEFAULT_DISTRO_FEATURES = "largefile opengl ptest multiarch wayland vulkan"
+POKY_DEFAULT_DISTRO_FEATURES = "largefile ptest multiarch vulkan"
 POKY_DEFAULT_EXTRA_RDEPENDS = "packagegroup-core-boot"
 POKY_DEFAULT_EXTRA_RRECOMMENDS = "kernel-module-af-packet"
 
Signature · 1 line
2.29.2