public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Richard Purdie" <richard.purdie@linuxfoundation.org>
To: Yeoh Ee Peng <ee.peng.yeoh@intel.com>,
	 openembedded-core@lists.openembedded.org
Cc: Humberto Ibarra <humberto.ibarra.lopez@intel.com>
Subject: Re: [OE-core] [PATCH] selftest/imagefeatures: Enable sanity test for IMAGE_GEN_DEBUGFS
Date: Thu, 23 Apr 2020 09:52:51 +0100	[thread overview]
Message-ID: <38bd6d9fd2144ed8f5bd90da57c6dbd686d3c684.camel@linuxfoundation.org> (raw)
In-Reply-To: <1585719470-55818-1-git-send-email-ee.peng.yeoh@intel.com>

On Wed, 2020-04-01 at 13:37 +0800, Yeoh Ee Peng wrote:
> Add new testcase to check IMAGE_GEN_DEBUGFS. Test makes
> sure that debug filesystem is created accordingly. Test also check
> for debug symbols for some packages as suggested by Ross Burton.
> 
> [YOCTO #10906]
> 
> Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com>
> Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
> ---
>  meta/lib/oeqa/selftest/cases/imagefeatures.py | 33 +++++++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
> 
> diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py
> index 5c519ac..9ad5c17 100644
> --- a/meta/lib/oeqa/selftest/cases/imagefeatures.py
> +++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py
> @@ -262,3 +262,36 @@ PNBLACKLIST[busybox] = "Don't build this"
>          self.write_config(config)
>  
>          bitbake("--graphviz core-image-sato")
> +
> +    def test_image_gen_debugfs(self):
> +        """
> +        Summary:     Check debugfs generation
> +        Expected:    1. core-image-minimal can be build with IMAGE_GEN_DEBUGFS variable set
> +                     2. debug filesystem is created when variable set
> +                     3. debug symbols available
> +        Product:     oe-core
> +        Author:      Humberto Ibarra <humberto.ibarra.lopez@intel.com>
> +                     Yeoh Ee Peng <ee.peng.yeoh@intel.com>
> +        """
> +        import glob
> +        image_name = 'core-image-minimal'
> +        deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
> +
> +        features = 'IMAGE_GEN_DEBUGFS = "1"\n'
> +        features += 'IMAGE_FSTYPES_DEBUGFS = "tar.bz2"\n'
> +        features += 'MACHINE = "genericx86-64"\n'
> +        self.write_config(features)
> +
> +        bitbake(image_name)
> +        dbg_tar_file = os.path.join(deploy_dir_image, "*-dbg.rootfs.tar.bz2")
> +        debug_files = glob.glob(dbg_tar_file)
> +        self.assertNotEqual(len(debug_files), 0, 'debug filesystem not generated')
> +        result = runCmd('cd %s; tar xvf %s' % (deploy_dir_image, dbg_tar_file))
> +        self.assertEqual(result.status, 0, msg='Failed to extract %s: %s' % (dbg_tar_file, result.output))
> +        result = runCmd('find %s -name %s' % (deploy_dir_image, "udevadm"))
> +        self.assertTrue("udevadm" in result.output, msg='Failed to find udevadm: %s' % result.output)
> +        dbg_symbols_targets = result.output.splitlines()
> +        self.assertTrue(dbg_symbols_targets, msg='Failed to split udevadm: %s' % dbg_symbols_targets)
> +        for t in dbg_symbols_targets:
> +            result = runCmd('objdump --syms %s | grep debug' % t)
> +            self.assertTrue("debug" in result.output, msg='Failed to find debug symbol: %s' % result.output)

The test failed on the autobuilder:

https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/858
https://autobuilder.yoctoproject.org/typhoon/#/builders/80/builds/855
https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/861
https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/849

Cheers,

Richard



  parent reply	other threads:[~2020-04-23  8:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-01  5:37 [PATCH] selftest/imagefeatures: Enable sanity test for IMAGE_GEN_DEBUGFS Yeoh Ee Peng
2020-04-21  3:10 ` Yeoh Ee Peng
2020-04-23  8:52 ` Richard Purdie [this message]
2020-04-23  9:33   ` [OE-core] " Yeoh Ee Peng
2020-04-24  9:39     ` Yeoh Ee Peng
2020-05-01  8:36   ` Yeoh Ee Peng
     [not found] <16019B7602D587BE.16702@lists.openembedded.org>
2020-04-01  5:43 ` Yeoh Ee Peng

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=38bd6d9fd2144ed8f5bd90da57c6dbd686d3c684.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=ee.peng.yeoh@intel.com \
    --cc=humberto.ibarra.lopez@intel.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