Bug 8510

Summary: TargetDumper.dump_target() from dump.py sometimes puts output in the wrong file
Product: [QA/Testing] Build Testing Reporter: Randy Witt <randy.e.witt>
Component: generalAssignee: Mariano Lopez <mariano.lopez>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: benjamin.esquivel
Version: 2.0   
Target Milestone: 2.1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Randy Witt 2015-10-13 20:46:47 UTC
Sometimes run_serial() will timeout before the data requested by the command in dump_target() has returned. That will make the current file empty(because it assumes the data is there), but then it proceeds to the next file which then gets the output from the previous command. Each file from then on will have the output from the previous command.

This makes it fairly hard to use the debug programatically or even manually since you have to inspect each file to figure out what the data actually is.

This could most likely be fixed by running a command such as "echo 'Running command foo'" as a heading before each command, and putting all the data in the same file. Or by then postprocessing based on the heading and putting the data into separate files based on the headings.
Comment 1 Mariano Lopez 2015-11-05 16:23:14 UTC
The problem is that there is a timeout while reading the socket. This timeout could be omitted because we are searching for the prompt as the last thing the socket will get
Comment 2 Mariano Lopez 2015-11-05 17:26:59 UTC
Sent patch for review
Comment 3 Mariano Lopez 2015-11-17 14:59:24 UTC
Patch is integrated in master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=3b95964bc1cb63c1b78249fd8f8c2d5d5fb2c288