NAK: [PATCH] UBUNTU: SAUCE: fix second test execution

Krzysztof Kozlowski krzysztof.kozlowski at canonical.com
Thu Jun 3 13:03:20 UTC 2021


On 03/06/2021 15:01, Krzysztof Kozlowski wrote:
> The setup() might not be called on second test run and actually autotest
> design assumes setup() for given version will be called exactly once.
> It is expected from setup() to modify only persistent state of the
> system, so on next run it's execution is not needed.  Runtime-only
> settings should not be configured via setup().
> 
> This fixes failure on second test execution:
> 
>     00:54:03 INFO | 	START	ubuntu_boot.log_check	ubuntu_boot.log_check
>     00:54:03 DEBUG| Persistent state client._record_indent now set to 2
>     00:54:03 DEBUG| Persistent state client.unexpected_reboot now set to ('ubuntu_boot.log_check', 'ubuntu_boot.log_check')
>     00:54:03 DEBUG| Waiting for pid 19403 for 300 seconds
>     00:54:03 WARNI| System python is too old, crash handling disabled
>     00:54:03 ERROR| Exception escaping from test:
>     Traceback (most recent call last):
>       File "/home/azure/autotest/client/shared/test.py", line 411, in _exec
>         _call_test_function(self.execute, *p_args, **p_dargs)
>       File "/home/azure/autotest/client/shared/test.py", line 830, in _call_test_function
>         raise error.UnhandledTestFail(e)
>     UnhandledTestFail: Unhandled AttributeError: 'ubuntu_boot' object has no attribute 'centos'
>     Traceback (most recent call last):
>       File "/home/azure/autotest/client/shared/test.py", line 823, in _call_test_function
>         return func(*args, **dargs)
>       File "/home/azure/autotest/client/shared/test.py", line 291, in execute
>         postprocess_profiled_run, args, dargs)
>       File "/home/azure/autotest/client/shared/test.py", line 212, in _call_run_once
>         self.run_once(*args, **dargs)
>       File "/home/azure/autotest/client/tests/ubuntu_boot/ubuntu_boot.py", line 63, in run_once
>         if not self.log_check():
>       File "/home/azure/autotest/client/tests/ubuntu_boot/ubuntu_boot.py", line 25, in log_check
>         if self.centos:
>     AttributeError: 'ubuntu_boot' object has no attribute 'centos'
> 
> Fixes: e14cb0e1bd0c ("UBUNTU SAUCE: ubuntu_boot Centos Support")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski at canonical.com>
> ---
>  ubuntu_boot/ubuntu_boot.py | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 

I forgot to add proper prefix in subject.


Best regards,
Krzysztof



More information about the kernel-team mailing list