Fri, Mar 20, 2020 at 04:20:05PM CET, olichtne(a)redhat.com wrote:
On Mon, Mar 16, 2020 at 07:03:22PM +0100, Jan Tluka wrote:
+
> + def single_ping_report(self, ping_config, result):
> fmt = "From: <{0.client.hostid} ({0.client_bind})> To: " \
> "<{0.destination.hostid} ({0.destination_address})>"
> description = fmt.format(ping_config)
> - if result["rate"] > 50:
> - message = "Ping successful --- " + description
> - self.add_result(True, message, result)
> - else:
> - message = "Ping unsuccessful --- " + description
> - self.add_result(False, message, result)
> + message = "Ping result --- " + description
> + self.add_result(result[0], message, result[1])
I think the PASS/FAIL distinction here is unnecessary. If the Ping test
module returns with a FAIL, this is already automatically represented in
the results and will be shown in the summary.
This should just be a "passing" result object that reports what was
returned by the ping module - in other words... what was measured.
I think this would be confusing. In FAIL case you would have two
records in the log:
FAIL I could not do ping for whatever reason ... (from Ping test module)
PASS Ping result --- from ... to ... (from the Ping recipe)
I also looked at the Perf code and it also reports FAIL if there are no
measurements to report.
Still in doubts as I understand your idea behind.
I'll wait for your further comments.
-Jan
> +
> + def single_ping_evaluate(self, ping_config, result):
> + for evaluator in ping_config.evaluators:
> + evaluator.evaluate_results(self, result[1])
>
> def _generate_ping_kwargs(self, ping_config):
> kwargs = dict(dst=ping_config.destination_address,
> --
> 2.21.1
> _______________________________________________
> LNST-developers mailing list -- lnst-developers(a)lists.fedorahosted.org
> To unsubscribe send an email to lnst-developers-leave(a)lists.fedorahosted.org
> Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives:
https://lists.fedorahosted.org/archives/list/lnst-developers@lists.fedora...