[Fuego] Background for [PATCH] fix_error_in_flat_plot_data_with_extra_newline

Tim.Bird at sony.com Tim.Bird at sony.com
Thu Nov 8 01:36:38 UTC 2018



> -----Original Message-----
> From: Zhong, Lu on Tuesday, November 06, 2018 6:57 PM
>
> When testing Benchmark.reboot, the following error occurred, and this is
> due to an extra newline in the flat_plot_data.txt.
> 
> Error:
> 
> "Error reading line ' 3.785669 le
> 
> ' in prepare_chart_data.py
> 
> Possible data corruption in flat_plot_data.txt
> 
> "
> 
> The log in flat_plot_data.txt:
> 
> m3ulcb_01 Benchmark.reboot default 4 2018-10-11T07:28:46+0000 4.9.0-
> yocto-standard default.reboot.time 10
> 
> 3.576811 le
> 
> 
> 
> And the reference value(with an extra newline) in flat_plot_data.txt is get
> from reference.log by function convert_reference_log_to_criteria().
> 
> So we modify the code in convert_reference_log_to_criteria() as following:
> 
> 
> 
>             tguid = "%s.%s.%s" % (ts_name, tc_name, measure_name)
> 
> -            value = lines[i+1]
> 
> +            value = lines[i+1].rstrip("\n")
> 
>             reference = {"value":value, "operator": operation.strip()}
> 
>             crit = {"tguid":tguid, "reference": reference }
> 
>             crit_list.append(crit)
> 
> //lines is the content of reference.log, and lines[i+1] contains an extra "\n"
> 
> 
> 
> After using this patch, the log in flat_plot_data.txt is as following:
> 
> m3ulcb_01 Benchmark.reboot default 4 2018-10-11T07:28:46+0000 4.9.0-
> yocto-standard default.reboot.time 10 3.576811 le
> 
> 
> 
> 
> 
> I have submitted this patch.
> 
> --[PATCH] fix_error_in_flat_plot_data_with_extra_newline
> 
> 
> 
> I am looking forward to your reply.

This bug was already fixed in master, in commit 63126a98
(See https://bitbucket.org/tbird20d/fuego-core/commits/63126a98f452dcd7d0191d24c54c74d73d5631f1)

This was committed on Oct 9, so maybe you have not updated
your version of Fuego-core to the latest version?

This fix will show up in the 1.4 release (it's already in my 'master'
branch, but if people are holding off until the next major release
to update their repositories, then they'll see it when the pull
the 1.4 release).

It's a great bug to fix, though.  Thanks for working on it.
I stumbled across it when I was doing a bunch of error handling
cleanups in the parser and core code in early October.

 -- Tim



More information about the Fuego mailing list