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 X-Patchwork-Id: 779766 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp2142558wrt; Tue, 12 Mar 2024 10:37:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW24kMa2E0ia6+XAv6bHqSZz6EIQ7wtytRRUTZwbWawAT+9KMxW6wdPU2byWqpgCacjuvLCRqbkIfBxx2cVhhLv X-Google-Smtp-Source: AGHT+IHsIfLrdHjlUff18lH6acfxo058swMNEGw5EjpD2wdXqNHWE3uqeQzDOztbcMhCHse9GpFi X-Received: by 2002:a05:6122:2018:b0:4c9:d0ee:bd67 with SMTP id l24-20020a056122201800b004c9d0eebd67mr7377884vkd.5.1710265024525; Tue, 12 Mar 2024 10:37:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710265024; cv=pass; d=google.com; s=arc-20160816; b=YekpG7RJTz0Vn7E52DlhrkZ8RYLIAJrzF+Tj2+XhkqFjcsew4sA6RoP6uP9kDJlQtn e/X4JjZ7wVLazK/7X8zSkmk/LzJ1i0zJJjoWEvBZwO2K//9FfjzPUlO0r39vy7UpRV/I o5RrsgE9kIjW6KLuS09I49GmLIf2KzoQb+Iu79icnIWGm4fyXKIhrL5lHsqprTA/jHeb 5FsphWwyDxUrVxlvqFQFuEZqpI0VEiJfv7HD0M9KAtXgMrkmtpbQ4k3FSZy8hMH7z3p4 kntZe3ipD1U9v6cpyASuY+1Sq9Rp0B+arz9xjVxyYvHmxf9nKhMQCOCcopRO2drIiG/f 1sEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=hQ+MnExrivG2Y+zur4QGRxc+TrLR/mUaTNnpPlTULxU=; fh=dHLBnA+MhGtNtN2B2JMAELi4oD+gmgMg7DL8H0jYbkI=; b=uSowzRQIhtg97dC7/3LTy0Dm15Bey19YHM5MMIj/R71E1O1iaH+ruMI1Tv6wPnWKl6 KBzXm9TerJP7lBGsjciMHTYUnkGlAVGs29YhDNMu7asTb83l86Ur8v3XNrsCz22Encph u6mDPEbVlIWzEtv3DGV1ddDUuBfn1GcgyAx8fotdV2yHhnJDuZ21pJyCvmS/xr2F4WdT VYV6jC3DHvJMWJFQA+YHt0QecRCrWoAbH6mGdPnF2yHaOQtxTukebVs11tlXYgu3ydUe e+z8AoH/rIdl+t0l4NIdG78ex4xDsa20qm7M2HTcY3xcKw7AJlv0V/Xk/5+S3BSK73+P CAlw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ddfP2lio; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id c4-20020a056214224400b0068fe28213f3si8459317qvc.74.2024.03.12.10.37.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 10:37:04 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ddfP2lio; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2A5523858036 for ; Tue, 12 Mar 2024 17:37:04 +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-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+patch=linaro.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);