<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>13871</bug_id>
          
          <creation_ts>2020-04-15 12:24:42 +0000</creation_ts>
          <short_desc>testimage assumes tools are installed on target for testimage_dump_target() function</short_desc>
          <delta_ts>2026-04-30 15:20:52 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>Scripts and Tools</component>
          <version>3.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Orling">tim.orling</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>87012</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2020-04-15 12:24:42 +0000</bug_when>
    <thetext>Additional task from original Bug #13681.

The testimage.bbclass assumes multiple tools will be installed on target for the testimage_dump_target() function [1]. These are NOT common tools for targets.

testimage_dump_target () {
    top -bn1
    ps
    free
    df
    # The next command will export the default gateway IP
    export DEFAULT_GATEWAY=$(ip route | awk &apos;/default/ { print $3}&apos;)
    ping -c3 $DEFAULT_GATEWAY
    dmesg
    netstat -an
    ip address
    # Next command will dump logs from /var/log/
    find /var/log/ -type f 2&gt;/dev/null -exec echo &quot;====================&quot; \; -exec echo {} \; -exec echo &quot;====================&quot; \; -exec cat {} \; -exec echo &quot;&quot; \;
}

First of all, these should be in a packagegroup for easy inclusion. Said packagegroup should be mentioned in a comment in the class. The class should check for whether those tools are installed and report a useful error to the user, rather than just a slew of file or path not found type errors.

[1] http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/testimage.bbclass#n99</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87037</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2020-04-16 08:00:24 +0000</bug_when>
    <thetext>On taget, check if executable exists before calling it. For host, just skip entirely.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87096</commentid>
    <comment_count>2</comment_count>
    <who name="Trevor Gamblin">tvgamblin</who>
    <bug_when>2020-04-28 07:22:41 +0000</bug_when>
    <thetext>Working on this. Is there an easy way with bitbake to check if these packages are installed already? Otherwise I&apos;ll do &quot;command -v foo || echo &quot;...&quot;&quot; sorts of additions to testimage_dump_target.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97145</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-10-30 15:37:31 +0000</bug_when>
    <thetext>Build move to 5.0 -- ../Randy</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98851</commentid>
    <comment_count>4</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-04-25 01:13:58 +0000</bug_when>
    <thetext>Bulk move of 5.0 medium importance issues to 5.99.
Move to 5.1 if you want to actively work on an issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98861</commentid>
    <comment_count>5</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-04-25 01:23:11 +0000</bug_when>
    <thetext>Move to 5.99 since no one is actively working on this issue.
Move to 5.x if you start on a task, please.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105321</commentid>
    <comment_count>6</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2026-04-30 15:20:52 +0000</bug_when>
    <thetext>https://git.openembedded.org/openembedded-core/commit/?id=a24d787987dccc95fdd95b7e85bf525a1c55b285</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>