From patchwork Thu Feb 21 16:42:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_D=C3=ADaz?= X-Patchwork-Id: 158925 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp696616jaa; Thu, 21 Feb 2019 08:42:34 -0800 (PST) X-Google-Smtp-Source: AHgI3IawhXFQm4G5nDqCsDTuKrDy1YWAChSXlHHIsFCYNbCAPelkK57WmS9qsAwn9PFjA3yw8eNY X-Received: by 2002:a5d:6703:: with SMTP id o3mr28410074wru.75.1550767354202; Thu, 21 Feb 2019 08:42:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550767354; cv=none; d=google.com; s=arc-20160816; b=fF1135YfVqaOBYgUMiinwIdyQ5jTlN1H5Ou4uFzlveCmxSjAj+A2yXiWkK0wpuZB8A eWXVF2ey4jC0LX2f5SALSdpz3LdYD0ufsaSxUMHfUfz804wuwnN20xx23DTstEv71uii OD+F0JCALNFBpPmGuxv9gOEj6bBGxY2Q12wApdbQVF5y+4G2BVdXQuvCO6TRFQAteh1I pMT1yAasJZA8sJSk3VuEKxYRe/uNymmsr89zpzbawnFXae3VLGvhHBjy5QHIJAsmctTN 6MW2FvcEEoDlZlitb2osflc41yGqMYPf6xDleFf3cQOB/pVi5ArH53fcMBuoykg+smhx Kwlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=Unod+Fe3md5bKKLVgMa7jHbN5nDjd4XQbVlEHPRA2z8=; b=lUlmG4GfVPv53uNYj0wromohW0HNsPavP0WauSaEI3HiNaJJQwLAEGa9ZjKXLFLDit xO8eAXQS6VXhsPDTO6GyKzLQKPvOty79VJribkhMkjzEceCRgPDBfGIhyA37mUps4D5w yVuwcbB/kuvoJm3P/4dap+FrfwG2uXsWbCzXikap6oUFgPL4MYsHrqiN00zgAnmi2N1y P5QjDEJTumc8ewTAlQxGkfZKT/1nyovVCTuMo9/ZH69f3LlvF+u70ZzfBzSvy2NAtsjS 5HenyecsedNIgfVFq0/MMCNrwVM9c+wF5+6YqZ1L1kJnMHEPpwtHjRMf7z3ZDQA8Zy2e U+xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=xk7DZFch; spf=pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 2001:1418:10:5::2 as permitted sender) smtp.mailfrom="ltp-bounces+patch=linaro.org@lists.linux.it"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from picard.linux.it (picard.linux.it. [2001:1418:10:5::2]) by mx.google.com with ESMTPS id z2si1243735wro.400.2019.02.21.08.42.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Feb 2019 08:42:34 -0800 (PST) Received-SPF: pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 2001:1418:10:5::2 as permitted sender) client-ip=2001:1418:10:5::2; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=xk7DZFch; spf=pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 2001:1418:10:5::2 as permitted sender) smtp.mailfrom="ltp-bounces+patch=linaro.org@lists.linux.it"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id B6200294AF5 for ; Thu, 21 Feb 2019 17:42:33 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [217.194.8.3]) by picard.linux.it (Postfix) with ESMTP id 4DBF0294AB6 for ; Thu, 21 Feb 2019 17:42:29 +0100 (CET) Received: from mail-ot1-x342.google.com (mail-ot1-x342.google.com [IPv6:2607:f8b0:4864:20::342]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by in-3.smtp.seeweb.it (Postfix) with ESMTPS id 6BBAC1A0518A for ; Thu, 21 Feb 2019 17:42:28 +0100 (CET) Received: by mail-ot1-x342.google.com with SMTP id v20so13473523otk.7 for ; Thu, 21 Feb 2019 08:42:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hErSM96vnUH5M4O2nacReYIIfDcz8cP9BCq/WIg3Alw=; b=xk7DZFchd9dxhGcMC2aq6GttiHAq2MPr1U3O7YWujDetbrliJrSgcZNsxkdzsfWWSu 0cc/+PM83cCw7gfC2B1UVlP2v7x/00/XrO8Df6pb9+r/nxypSCkwBzTa3RNGN2nMAp/r YLz1KHyS5eEkp7d3G2eOdDjJF/stAUr7XqahJ4JHUYXdNuYHLWwbX3EXGo6txR9VEx7w l1fHuwVYVxPS/91jyft9qbSNtDDWICVRItzlb7ncvS7J3N0qXbYVr94h58Xvi+JRQAyB yjxRq+Omxijp3Yl+LkJPZXEHJRUuTwaUj0PtbPBx/PMgZsTcvXytQeL6JSUvwHJ3dedT CGhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hErSM96vnUH5M4O2nacReYIIfDcz8cP9BCq/WIg3Alw=; b=lJfIqtXhH0nKGjBPMOzc9+ldngyJ093TfIaXQ3Mc0Dpmn32KsMbfwfnxAeWT8QyNBW KNx/YLJf7qsrkmewEP805h66bK0Z6dyKBbw/Cvj0lOraKEZKuAiL9+GREJyW82Kys1Qg NsaV3qGbm3mh49PcSP7Hkn0Dh5AF36Md+PAMeYDaitRA5tnX7zYoRs7CgFM1caVEh+mK AYVgSIpal/c+UEewdit8qO36cSmp3/OhI3y5g3fvvUs5CWLh5tzakJfyFONGzf4hjBFW UISOUOBK6Xh2dBojF0KTBXWJHVUgErXtxQ/QxxbZE++88D2cQ6ckBFQJRfNMdXdDuAqO TO4A== X-Gm-Message-State: AHQUAuZiD4LmJfq7eGgHhCuOlhTbiODJr4Xoav4ePkWWZXRSxSPVxH0n swbbdFATzJpRzDr1ILY/zMu2ERMK/VI= X-Received: by 2002:a9d:27e6:: with SMTP id c93mr24259647otb.195.1550767346421; Thu, 21 Feb 2019 08:42:26 -0800 (PST) Received: from alago.cortijodelrio.net (CableLink-189-218-30-19.Hosts.InterCable.net. [189.218.30.19]) by smtp.googlemail.com with ESMTPSA id f127sm10269105oih.31.2019.02.21.08.42.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Feb 2019 08:42:25 -0800 (PST) From: =?utf-8?q?Daniel_D=C3=ADaz?= To: ltp@lists.linux.it Date: Thu, 21 Feb 2019 10:42:13 -0600 Message-Id: <20190221164213.4952-1-daniel.diaz@linaro.org> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-3.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-3.smtp.seeweb.it Subject: [LTP] [PATCH] Define __SIGRTMIN and __SIGRTMAX for MUSL X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+patch=linaro.org@lists.linux.it Sender: "ltp" Some libc implementations might differ in the definitions they include. Exempli gratia: MUSL does not define __SIGRTMAX nor __SIGRTMIN. These two tests fail to build because of the missing definitions: testcases/kernel/syscalls/ptrace/ptrace05.c testcases/kernel/syscalls/sighold/sighold02.c Out of precaution, these two also include this header: lib/tst_sig.c testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c Signed-off-by: Daniel Díaz --- include/lapi/signal.h | 24 +++++++++++++++++++ lib/tst_sig.c | 1 + testcases/kernel/syscalls/ptrace/ptrace05.c | 1 + .../syscalls/rt_sigsuspend/rt_sigsuspend01.c | 1 + testcases/kernel/syscalls/sighold/sighold02.c | 1 + 5 files changed, 28 insertions(+) create mode 100644 include/lapi/signal.h diff --git a/include/lapi/signal.h b/include/lapi/signal.h new file mode 100644 index 000000000..d22965a94 --- /dev/null +++ b/include/lapi/signal.h @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (c) 2019 Linaro Limited. All rights reserved. + * Author: Daniel Díaz + */ + +#ifndef LAPI_SIGNAL_H +#define LAPI_SIGNAL_H + +#include + +/* + * Some libc implementations might differ in the definitions they include. This + * covers those differences for all tests to successfully build. + */ + +#ifndef __SIGRTMIN +# define __SIGRTMIN 32 +#endif +#ifndef __SIGRTMAX +# define __SIGRTMAX (_NSIG - 1) +#endif + +#endif diff --git a/lib/tst_sig.c b/lib/tst_sig.c index 36565e13d..6d77aeafd 100644 --- a/lib/tst_sig.c +++ b/lib/tst_sig.c @@ -72,6 +72,7 @@ #include #include #include "test.h" +#include "lapi/signal.h" #define MAXMESG 150 /* size of mesg string sent to tst_res */ diff --git a/testcases/kernel/syscalls/ptrace/ptrace05.c b/testcases/kernel/syscalls/ptrace/ptrace05.c index 420330029..54cfa4d7b 100644 --- a/testcases/kernel/syscalls/ptrace/ptrace05.c +++ b/testcases/kernel/syscalls/ptrace/ptrace05.c @@ -38,6 +38,7 @@ #include "ptrace.h" #include "test.h" +#include "lapi/signal.h" char *TCID = "ptrace05"; int TST_TOTAL = 0; diff --git a/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c b/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c index f17a9aae6..e577cf227 100644 --- a/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c +++ b/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c @@ -18,6 +18,7 @@ #include "tst_test.h" #include "lapi/syscalls.h" #include "lapi/safe_rt_signal.h" +#include "lapi/signal.h" static void sig_handler(int sig) { diff --git a/testcases/kernel/syscalls/sighold/sighold02.c b/testcases/kernel/syscalls/sighold/sighold02.c index d1d4b0b06..b763142df 100644 --- a/testcases/kernel/syscalls/sighold/sighold02.c +++ b/testcases/kernel/syscalls/sighold/sighold02.c @@ -49,6 +49,7 @@ #include #include "test.h" #include "safe_macros.h" +#include "lapi/signal.h" /* _XOPEN_SOURCE disables NSIG */ #ifndef NSIG