Bug 13872

Summary: testimage assumes tools are installed on host for testimage_dump_host() function
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Tim Orling <tim.orling>
Component: Scripts and ToolsAssignee: Thomas Roos <thomas>
Status: RESOLVED OBSOLETE QA Contact:
Severity: normal    
Priority: Medium CC: randy.macleod, ross.burton, thomas
Version: 3.1   
Target Milestone: 4.3   
Hardware: x86   
OS: Multiple   
Whiteboard: NEWCOMER
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Tim Orling 2020-04-15 12:29:37 UTC
Additional task from original Bug #13681.

The testimage.bbclass assumes multiple tools will be installed on host for the testimage_dump_host() function [1].

testimage_dump_host () {
    top -bn1
    iostat -x -z -N -d -p ALL 20 2
    ps -ef
    free
    df
    memstat
    dmesg
    ip -s link
    netstat -an
}

Should these tools be added to HOSTTOOLS or otherwise noted as required somewhere?
At least the function should test for the presence of the tools and report a useful error 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#n114
Comment 1 Randy MacLeod 2020-04-16 08:02:19 UTC
Delete this code.
Comment 2 Randy MacLeod 2023-04-11 20:28:44 UTC
Still in poky: commit f79046d082f3a7752e6780b2990470dcd36cbba4 (origin/master, origin/HEAD)


❯ rg testimage_dump_host
meta/classes-recipe/testexport.bbclass
65:        d.getVar("testimage_dump_host"), d.getVar("TESTIMAGE_DUMP_DIR"))

meta/classes-recipe/testimage.bbclass
118:testimage_dump_host () {
344:        d.getVar("testimage_dump_host"),

meta/lib/oeqa/targetcontrol.py
107:        dump_host_cmds = d.getVar("testimage_dump_host")
Comment 5 Randy MacLeod 2024-01-18 16:10:49 UTC
We have droped the testimage_dump_host() function in:
https://git.yoctoproject.org/poky/commit/?id=f82c3bd37d62a3efc49fd33efa38a7f523e6c676