($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: Ross Burton <ross.burton@arm.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH v2 3/3] oeqa/selftest/debuginfod: use localpkgfeed to speed server startup
Date: Tue, 14 May 2024 16:15:21 +0000	[thread overview]
Message-ID: <20240514161521.4082896-3-ross.burton@arm.com> (raw)
In-Reply-To: <20240514161521.4082896-1-ross.burton@arm.com>

Sometimes the debuginfod selftest fails due to a timeout, because it
spends too long scanning a huge deploy directory that due to what tests
were ran previously can contain 30K packages.

The test only needs a subset of the feed, so use the new localpkgfeed
class to construct a minimal feed before running the test.

[ YOCTO #14937 ]

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/lib/oeqa/selftest/cases/debuginfod.py | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/debuginfod.py b/meta/lib/oeqa/selftest/cases/debuginfod.py
index 505b4be8373..46c0cd87bbc 100644
--- a/meta/lib/oeqa/selftest/cases/debuginfod.py
+++ b/meta/lib/oeqa/selftest/cases/debuginfod.py
@@ -62,7 +62,7 @@ class Debuginfod(OESelftestTestCase):
 
         raise TimeoutError("Cannot connect debuginfod, still %d scan jobs running" % latest)
 
-    def start_debuginfod(self):
+    def start_debuginfod(self, feed_dir):
         # We assume that the caller has already bitbake'd elfutils-native:do_addto_recipe_sysroot
 
         # Save some useful paths for later
@@ -82,7 +82,7 @@ class Debuginfod(OESelftestTestCase):
             # Disable rescanning, this is a one-shot test
             "--rescan-time=0",
             "--groom-time=0",
-            get_bb_var("DEPLOY_DIR"),
+            feed_dir,
         ]
 
         format = get_bb_var("PACKAGE_CLASSES").split()[0]
@@ -114,11 +114,12 @@ class Debuginfod(OESelftestTestCase):
         self.write_config("""
 TMPDIR = "${TOPDIR}/tmp-debuginfod"
 DISTRO_FEATURES:append = " debuginfod"
+INHERIT += "localpkgfeed"
 """)
-        bitbake("elfutils-native:do_addto_recipe_sysroot xz xz:do_package")
+        bitbake("elfutils-native:do_addto_recipe_sysroot xz xz:do_package xz:do_localpkgfeed")
 
         try:
-            self.start_debuginfod()
+            self.start_debuginfod(get_bb_var("LOCALPKGFEED_DIR", "xz"))
 
             env = os.environ.copy()
             env["DEBUGINFOD_URLS"] = "http://localhost:%d/" % self.port
@@ -141,12 +142,13 @@ DISTRO_FEATURES:append = " debuginfod"
         self.write_config("""
 TMPDIR = "${TOPDIR}/tmp-debuginfod"
 DISTRO_FEATURES:append = " debuginfod"
+INHERIT += "localpkgfeed"
 CORE_IMAGE_EXTRA_INSTALL += "elfutils xz"
         """)
-        bitbake("core-image-minimal elfutils-native:do_addto_recipe_sysroot")
+        bitbake("core-image-minimal elfutils-native:do_addto_recipe_sysroot xz:do_localpkgfeed")
 
         try:
-            self.start_debuginfod()
+            self.start_debuginfod(get_bb_var("LOCALPKGFEED_DIR", "xz"))
 
             with runqemu("core-image-minimal", runqemuparams="nographic") as qemu:
                 cmd = "DEBUGINFOD_URLS=http://%s:%d/ debuginfod-find debuginfo /usr/bin/xz" % (qemu.server_ip, self.port)
-- 
2.34.1



      parent reply	other threads:[~2024-05-14 16:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-14 16:15 [PATCH v2 1/3] lib/oe/package-manager: allow including self in create_packages_dir Ross Burton
2024-05-14 16:15 ` [PATCH v2 2/3] selftest/classes: add localpkgfeed class Ross Burton
2024-05-14 16:15 ` Ross Burton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240514161521.4082896-3-ross.burton@arm.com \
    --to=ross.burton@arm.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).