ACK: [PATCH] [autotest-client-tests] UBUNTU SAUCE: ubuntu_ltp_syscalls: properly handle SIGXFSZ
Colin Ian King
colin.king at canonical.com
Thu Oct 29 18:54:54 UTC 2020
On 29/10/2020 18:52, Andrea Righi wrote:
> BugLink: https://bugs.launchpad.net/bugs/1902118
>
> python is redefining the SIGXFSZ signal handler internally, blocking the
> delivery of this signal to all the children tasks. This can break some
> tests (like kill11 for example) that are expecting to find the default
> signal handler and properly receive the signal.
>
> Make sure to restore the default signal handler for SIGXFSZ before
> running any test.
>
> Signed-off-by: Andrea Righi <andrea.righi at canonical.com>
> ---
> ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py b/ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py
> index 8d01186b..dac16692 100644
> --- a/ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py
> +++ b/ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py
> @@ -6,9 +6,19 @@ import platform
> import re
> import sys
> import time
> +import signal
> from autotest.client import test, utils
> from autotest.client.shared import error
>
> +# python is redefining the SIGXFSZ handler internally, blocking the delivery of
> +# this signal to any forked task. Make sure to restore the default signal
> +# handler for SIGXFSZ before running any test.
> +try:
> + signal.signal(signal.SIGXFSZ, signal.SIG_DFL)
> +except Exception, e:
> + print(e)
> + sys.stdout.flush()
> +
> class ubuntu_ltp_syscalls(test.test):
> version = 1
>
>
Nice catch. Looks sane to me. Thanks Andrea.
Acked-by: Colin Ian King <colin.king at canonical.com>
More information about the kernel-team
mailing list