qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 10/18] Boot Linux Console Test: refactor the con


From: Cleber Rosa
Subject: Re: [Qemu-devel] [PATCH 10/18] Boot Linux Console Test: refactor the console watcher into utility method
Date: Thu, 31 Jan 2019 14:29:52 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0


On 1/31/19 12:46 PM, Wainer dos Santos Moschetta wrote:
> Hi Cleber,
> 
> On 01/17/2019 04:56 PM, Cleber Rosa wrote:
>> This introduces a utility method that monitors the console device and
>> looks for either a message that signals the test success or failure.
>>
>> Signed-off-by: Cleber Rosa <address@hidden>
>> ---
>>   tests/acceptance/boot_linux_console.py | 30 ++++++++++++++++++--------
>>   1 file changed, 21 insertions(+), 9 deletions(-)
>>
>> diff --git a/tests/acceptance/boot_linux_console.py
>> b/tests/acceptance/boot_linux_console.py
>> index 35b31162d4..278bb2be3d 100644
>> --- a/tests/acceptance/boot_linux_console.py
>> +++ b/tests/acceptance/boot_linux_console.py
>> @@ -23,6 +23,25 @@ class BootLinuxConsole(Test):
>>         timeout = 60
>>   +    def wait_for_console_pattern(self, success_message,
>> +                                 failure_message='Kernel panic - not
>> syncing'):
>> +        """
>> +        Waits for messages to appear on the console, while logging
>> the content
>> +
>> +        :param success_message: if this message appears, test succeeds
>> +        :param failure_message: if this message appears, test fails
>> +        """
> 
> What's the docstring format used here? I am wondering if :type is optional.
> 
> - Wainer
> 

I've been using the same Sphinx-based docstring statements we've been
using in Avocado, for the sake of cross reference.  So yes, type is
optional, and go on the same line, or on a different one with ":type
<name of parame>".

But, there may be issues that we don't know as we're not building those
API docs.  IIRC Eduardo Habkost is going to propose a GSOC project
related to building API docs.

- Cleber.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]