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: 1046270 X-Patchwork-Delegate: petr.vorel@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="xk7DZFch"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4450d60vNDz9s8m for ; Fri, 22 Feb 2019 03:42:34 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 931D4294AD3 for ; Thu, 21 Feb 2019 17:42:31 +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-Google-Smtp-Source: AHgI3IZbKfzkknloAb8Ox/0b3kRJFkhExlpkity8puNAYw5a9YP1eqCCMm9+agxLk7QQoWD/bSpJ1g== 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+incoming=patchwork.ozlabs.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