On 03/05/2012 11:43 PM, Amos Kong wrote:
> Check the whole autotest repo by grep, fix rest problem.
>
> threading.is_alive is only available starting with Python 2.6.

Thanks Amos, applied:

https://github.com/autotest/autotest/commit/4470beaf712a7cdc80f04cf64b0100057f135954

> Signed-off-by: Amos Kong<[email protected]>
> ---
>   client/tests/kvm/tests/virtio_console.py |    6 +++---
>   client/virt/tests/ntttcp.py              |    2 +-
>   2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/client/tests/kvm/tests/virtio_console.py 
> b/client/tests/kvm/tests/virtio_console.py
> index fcf71ad..a52b9e1 100644
> --- a/client/tests/kvm/tests/virtio_console.py
> +++ b/client/tests/kvm/tests/virtio_console.py
> @@ -1359,7 +1359,7 @@ def run_virtio_console(test, params, env):
>                                tmp[:-2])
>                   i+=1
>                   time.sleep(2)
> -            if not threads[0].is_alive():
> +            if not threads[0].isAlive():
>                   if exit_event.isSet():
>                       raise error.TestFail("Exit event emited, check the log 
> for"
>                                            "send/recv thread failure.")
> @@ -1367,7 +1367,7 @@ def run_virtio_console(test, params, env):
>                       raise error.TestFail("Send thread died unexpectedly in "
>                                            "migration %d", (j+1))
>               for i in range(0, len(recv_pts)):
> -                if not threads[i+1].is_alive():
> +                if not threads[i+1].isAlive():
>                       raise error.TestFail("Recv thread %d died unexpectedly 
> in "
>                                            "migration %d", i, (j+1))
>                   if verified[i] == threads[i+1].idx:
> @@ -1382,7 +1382,7 @@ def run_virtio_console(test, params, env):
>           exit_event.set()
>           # Send thread might fail to exit when the guest stucks
>           i = 30
> -        while threads[0].is_alive():
> +        while threads[0].isAlive():
>               if i<= 0:
>                   raise error.TestFail("Send thread did not finish")
>               time.sleep(1)
> diff --git a/client/virt/tests/ntttcp.py b/client/virt/tests/ntttcp.py
> index 66cdbfe..dab2e1f 100644
> --- a/client/virt/tests/ntttcp.py
> +++ b/client/virt/tests/ntttcp.py
> @@ -157,7 +157,7 @@ def run_ntttcp(test, params, env):
>       try:
>           bg = virt_utils.Thread(receiver, ())
>           bg.start()
> -        if bg.is_alive():
> +        if bg.isAlive():
>               sender()
>               bg.join(suppress_exception=True)
>           else:
>

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to