From patchwork Thu Oct 29 18:52:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Righi X-Patchwork-Id: 1390321 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CMZMR41Bwz9sSn; Fri, 30 Oct 2020 05:53:07 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1kYD2k-0003Om-S9; Thu, 29 Oct 2020 18:53:02 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kYD2k-0003Oc-6N for kernel-team@lists.ubuntu.com; Thu, 29 Oct 2020 18:53:02 +0000 Received: from mail-wm1-f71.google.com ([209.85.128.71]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kYD2j-00071z-TP for kernel-team@lists.ubuntu.com; Thu, 29 Oct 2020 18:53:01 +0000 Received: by mail-wm1-f71.google.com with SMTP id 13so283273wmf.0 for ; Thu, 29 Oct 2020 11:53:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition; bh=SIURFMaE/7QyXmrnIUWPmVlmWOqlJmK53uZAMcGo+Ck=; b=nzop/g4FTibpG8p4l3uBBpq1vbX4L7x73ZDVfBjiuZsTyiQ+dzAyHLy9onZd4CsAZS gee3Nn8AJzUuviqay1SfBrKqmL7RM+8BhicHBw50OtMcH8pXRqt6Bs0EYBU1uVVpM1WR bfoWQD90xjbWMFNumZa2g56k4fb803UnCPhhDzWs9CX6lGJD1vBDGpDyGw3BhXJhxnFw ntOfraZ0VXgcV8MqDTUNSac8rYX7yts6+x4HjaJjT3qsyRMwm5RqRhXlOqERmZzOqRxK wR13ucV8KMjn07PPug3ctcAVcg6Rq6Nntnnw4IzCr3NwbMZNyJiTyLH0bX/w34suFqgP NChA== X-Gm-Message-State: AOAM5315tJhZ5/UU5GuCz2IRkrf44JFHAh9ehYuQp/2m4KAuQt+DrNsh 00YkaUFPZ1rmGh5ikroGjpdTKr4pMs6qQO1898oq17nlDnahWM+BqoK8py7wJ0PN8uXWsSEzc/0 35MMd5o0Oq7ztCOCWWL6aS9tOlGVAoTEkWCnFmJodrA== X-Received: by 2002:a5d:6a86:: with SMTP id s6mr7486474wru.344.1603997581217; Thu, 29 Oct 2020 11:53:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFNrehGjmGMyyzVMeQHVFr1j/Qp99dMEUC/L3wtsG4MIL+KPoC6he4kx7FDHup2XoNep34Ug== X-Received: by 2002:a5d:6a86:: with SMTP id s6mr7486453wru.344.1603997580934; Thu, 29 Oct 2020 11:53:00 -0700 (PDT) Received: from localhost (host-79-33-123-6.retail.telecomitalia.it. [79.33.123.6]) by smtp.gmail.com with ESMTPSA id v123sm1246249wme.7.2020.10.29.11.53.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2020 11:53:00 -0700 (PDT) Date: Thu, 29 Oct 2020 19:52:59 +0100 From: Andrea Righi To: kernel-team@lists.ubuntu.com Subject: [PATCH] [autotest-client-tests] UBUNTU SAUCE: ubuntu_ltp_syscalls: properly handle SIGXFSZ Message-ID: <20201029185259.GA89655@xps-13-7390> MIME-Version: 1.0 Content-Disposition: inline X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" 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 Acked-by: Colin Ian King Acked-by: Po-Hsu Lin --- 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