Bug 8510 - TargetDumper.dump_target() from dump.py sometimes puts output in the wrong file
Summary: TargetDumper.dump_target() from dump.py sometimes puts output in the wrong file
Status: RESOLVED FIXED
Alias: None
Product: Build Testing
Classification: QA/Testing
Component: general (show other bugs)
Version: 2.0
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.1
Assignee: Mariano Lopez
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-10-13 20:46 UTC by Randy Witt
Modified: 2015-11-17 14:59 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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