From patchwork Tue Mar 12 17:36:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1911304 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ddfP2lio; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TvLSD463gz1yWn for ; Wed, 13 Mar 2024 04:37:16 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F20873858032 for ; Tue, 12 Mar 2024 17:37:08 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id E00B8385840C for ; Tue, 12 Mar 2024 17:36:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E00B8385840C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E00B8385840C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710265016; cv=none; b=dqxapG/2NnkqDccQMuWn/KwNCCiKejyF6mpgk9ChFcdh05O0UAvocX7aW+N/E9bUgQ/CU/WOe1/DX5durluXbgDfGpbpy4j/3ZtHzuD+vhsxmWGxfQBoWjAGhHAX8sZcKhyUgH3Cj4MNV0zNSPNrIPnq65fB0HNVPrlz8/H7X04= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710265016; c=relaxed/simple; bh=0UhnNKeRSqEL2rtF39rcUf/LjCERgeomRwr3/o03xUc=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=FkcmfXeAKXSu6mxKzvbDFG060cVSY+ATWstzFwvqyWjTFu7QtR/sz8csaCjO4XiYg9kjvzytf8tXymsG71hGsHCGpWn4qye9ZvSJRkHMbARki2RObxV4P814IRTsI/0vZ+C3kpBU2GCsZsWiYUd6Lu40RO0UfiK6EGRClmw5DyU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1ddbad556a8so6426055ad.3 for ; Tue, 12 Mar 2024 10:36:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710265013; x=1710869813; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=hQ+MnExrivG2Y+zur4QGRxc+TrLR/mUaTNnpPlTULxU=; b=ddfP2liostuhFEv9gS/P34g2MhDo5/F/AM8MYGZt+7djHnUY37Q3PsqFMc64FgFRzd gLQvNpyFVMa3E1vd1WRtW+91eBZEeZrqmAjBlvLDIqVZCiW6QEPjZyaf/1+2Dz79z3OL MLY0aBEzgQ+llns8IsN8/o6piEKWCiqT4oy0cuNZxHEt36VWgopdVicdLn9FTfVGcJ1b i7d50yTdsbltGCGZX2JFeT01eF1p4uHwPEd25hlfgqSnbNtdtSh2fdjcQKuBcATDgae5 Zcvx08TvSsyCg7nnT58i9+NqrEAjHezXdj6MFoT6ucTtTLPCKRjGFVZKFEuUeEPuGIXD Y78Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710265013; x=1710869813; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hQ+MnExrivG2Y+zur4QGRxc+TrLR/mUaTNnpPlTULxU=; b=mlPLBaJ3gKOS+leVrmNejjrZvkHZ+LehvnNriA8CB0X9U69m02iZ5ptZiJP5+G0rjj b8+tP/VpNQ3LyKTXzSt/+0qon7Kf+GEQppfBNdOfE8h3NSfsu5joZcLTwaO9R6GKMqJV grC2nmCu5ni9EhYPyykM6fFxd5WPOWZzRM4aq/erE0BSGD+1fbENSvUb8X8EY1Dqp/Cx 4QrDCjx+J4nMj400tHCtLIK6Itzwvi2ieimv1KkgSKFNGGCHr/oNaTG2LQ82nefjQ3Be VlIPAKDuHDKNLRpWXTvC0xqAoDeHcO1dF+qANB/bMmLLHmdp3i3o0zdcxCARoRvufuzp Jfkw== X-Gm-Message-State: AOJu0YznvMntb/5UrPvOFUsCLDTqAGlQpSkk1Y66pdkcjt3M9XeWTKtE SyzS64fXDvos5AeTG0Rh6zZJzbHsyNy/peFhOuvWH2QM6dxD8LI6cZWDlI60oOjir/zth2pLmNV 2 X-Google-Smtp-Source: AGHT+IGAlgWJgDZowmRkFphiW6jEDUS74whUKW35bQXXvA9ZhXDR4nxZNJ/MYC8ntENrwrQ8xOWSEA== X-Received: by 2002:a17:902:db02:b0:1dd:8ffc:54a8 with SMTP id m2-20020a170902db0200b001dd8ffc54a8mr9283957plx.47.1710265013342; Tue, 12 Mar 2024 10:36:53 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c2:8dfd:281a:8caa:77d5:74db]) by smtp.gmail.com with ESMTPSA id j11-20020a170902da8b00b001dd55986b75sm5100718plx.183.2024.03.12.10.36.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 10:36:52 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH] signal: Avoid system signal disposition to interfere with tests Date: Tue, 12 Mar 2024 14:36:49 -0300 Message-Id: <20240312173649.1549645-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Both tst-sigset2 and tst-signal1 expectes that SIGINT disposition is set to SIG_DFL. --- signal/tst-sigset2.c | 4 ++++ sysdeps/pthread/tst-signal1.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/signal/tst-sigset2.c b/signal/tst-sigset2.c index 4eef653f95..c1d125e4cb 100644 --- a/signal/tst-sigset2.c +++ b/signal/tst-sigset2.c @@ -11,6 +11,8 @@ #include #include +#include + /* The sigset function is deprecated. */ DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations"); @@ -148,6 +150,8 @@ returnTest3 (void) int main (int argc, char *argv[]) { + xsignal (TEST_SIG, SIG_DFL); + pid_t childPid; childPid = fork(); diff --git a/sysdeps/pthread/tst-signal1.c b/sysdeps/pthread/tst-signal1.c index 1c550ef8eb..ca145eef3d 100644 --- a/sysdeps/pthread/tst-signal1.c +++ b/sysdeps/pthread/tst-signal1.c @@ -26,6 +26,7 @@ #include #include +#include static sigset_t ss; static pthread_barrier_t *b; @@ -93,6 +94,8 @@ receiver (void) static int do_test (void) { + xsignal (SIGINT, SIG_DFL); + char tmp[] = "/tmp/tst-signal1-XXXXXX"; int fd = mkstemp (tmp);