提交 c446c338 编写于 作者: L Lukáš Doktor

docs: Add note regarding whiteboard's safety

The whiteboard is a neat feature to avoid boiler-plate code and to
improve the results structure. But in one of the recent presentations
about Avocado I saw a usage which was not really inlined with how this
feature work so let's explicitly mention it's convenient, but not
intended for cases where the system might crash (or so).
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 60f96698
......@@ -62,9 +62,11 @@ Saving test generated (custom) data
Each test instance provides a so called ``whiteboard``. It can be accessed
through ``self.whiteboard``. This whiteboard is simply a string that will be
automatically saved to test results (as long as the output format supports it).
If you choose to save binary data to the whiteboard, it's your responsibility to
encode it first (base64 is the obvious choice).
automatically saved to test results after the test finishes (it's not synced
during the execution so when the machine or python crashes badly it might
not be present and one should use direct io to the ``outputdir`` for
critical data). If you choose to save binary data to the whiteboard,
it's your responsibility to encode it first (base64 is the obvious choice).
Building on the previously demonstrated ``sleeptest``, suppose that you want to save the
sleep length to be used by some other script or data analysis tool::
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册