Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp433495lqh; Tue, 7 May 2024 03:54:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXg9Bl86I2S83BFKA+4gDCN8KmUjVvD9YMAm4P+BnU2o2ti0ES9iZ5xZk4Ak3ppQnekk1m+TxKFiZuxoTV+s87wDaSloynIYYAry5b9eA== X-Google-Smtp-Source: AGHT+IF7qNE0geu9S896Be686YPViPr5QeAXOSFtkdcd0GcYCfQKGRlZCyMYPXENyMFhUhpKY1Xc X-Received: by 2002:a05:6214:d88:b0:6a0:a76b:e216 with SMTP id e8-20020a0562140d8800b006a0a76be216mr15903950qve.13.1715079280864; Tue, 07 May 2024 03:54:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715079280; cv=pass; d=google.com; s=arc-20160816; b=kTYIK5B4uN/sjGGB0z0maMcLm458N6qi1x9OUO/Ge2GmH1AW7K/63/9Cq+Hw9wk7aL dZBRcRruYlmADXsTC7DMIjpTxX2fPXel3EQIbmG/cPISJYTBJYNCkQjDaA3+glt0MXSA RhAxytoEMQPnWmOZVFwyE+LKLmtDMO2jSbPyV8nYU82iLctpavic5168vBzBOGS/96fD zgo4m3ghgrl/2jgQ06Jwo6fA2PJe4+l5/X8o55HEmsYwabFS365z5PnBZFE+r4/DAAHy to7I0gwq7sW+cwGhvrMw39XIEEabSW4SSlvmYEtoAGAG5aYCfrn2xCKjFfk+/2a9lF/Y Iicw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=BiDQU3FGOJJzQ8YWFpIsbfFD5/abtSwJrwOdySns7EA=; fh=a8djl9lyXJM4xb9ZoXUMYgRG7DpuuPohCZu4SUrCoNY=; b=bG5GLNnzqvYA58la3PlFUS3rXCeVYXXWpvpdkjHkgnfFDOifTUSRdnzS6yORSqQFnG HRSrSPfgkf2RcYCMSpze+dHuMlqLjgNDC8JN91xH3FiEbl9StQd2MkdZi0JePECW1URL fB6SRRsxEV7t7rbzBUYQGF9eQ1qThIGL6cVljJgtic8Xp1z+dwv5TvLFnObEpVN3D5lj uDyYomWhHQb0IWpusJbKaAU2ypYLZDtS6DYZUfG1SJ8VrztWsGjInhLefsRA4ZYmTSh3 AXFlXWwqivyT1fuh8uT674ttXtxPklu6wF2ZbJPeB2KHn7ATdqdmsoA36FmYpIQYwkjn rbIg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sQwAI7pF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171147-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171147-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f6-20020a0562141d2600b006a0b85bc31csi11621754qvd.303.2024.05.07.03.54.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 03:54:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171147-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sQwAI7pF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171147-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171147-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9665E1C23325 for ; Tue, 7 May 2024 10:54:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F69F155742; Tue, 7 May 2024 10:53:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sQwAI7pF" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D3A81514E7; Tue, 7 May 2024 10:53:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715079226; cv=none; b=bpdRsZmIc04ui9MAb7El6dpM4GL0KBDYG7eF8PL5JQwJ65UBIx3gAGxjll111FbWs9eh3Nh+kaZ9h1Z5k0mUmm7eGcIURTgixtZ9QzUbOl/nSHB36UO8aAJ5V7+gm/KMEomLvg+a0ZK9XreQbDrqVeXYsWAMaNjRzOwlZMTC2fw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715079226; c=relaxed/simple; bh=hPNoNz/g0I0oQPt/EFnqKp4bIa85B5bemCYHctr92U4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=r4OOLGVmJZXufsyknJuihbb6jWVBlWs6EXgECum/uJbB0lF+fg+J16u8Af1h4U5IUZyCw6FL3rA8bhA65EKTDzO+0zl8Bp7nhbE/fAi3XOBbgFGcbzc3i8pq1KeW+G9VDmTFE1a+P+h/5gvDQ5bC1olNrYNhuXI+NrXb3YCzV8s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sQwAI7pF; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD63DC4AF63; Tue, 7 May 2024 10:53:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715079225; bh=hPNoNz/g0I0oQPt/EFnqKp4bIa85B5bemCYHctr92U4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=sQwAI7pFMlEkTyzClB0iQYDUxEIFMwCadJADJv0UuKF0stcPVmE5iBuWrr/zPQ0ae MZ7KvqUUGh+lVYytmm4fcPpa33ZITC8J+OUQYEf0ZbbrBRKTMcmUV5gdA4D8JzMyge 1my0Lw3XCTXlp/4x6846+5eXf3h+9Pf4lHu9uNy3pnEfjEO9MzgWRqAmNqTy8wsa2R pmn2ZBI/E3J+fg43+67CqOaG6FdzKBaogCv5uGV3V88AvJcXiyx4B/Xuxrdx3qFRmC CI6pAtwfOJRX95Y9M5o6Q609MDUL1Hb5whrhO0AKdL4vA1gmFcNHaTXFdE6l8lfCop mm1bEgBwLyg+g== From: "Matthieu Baerts (NGI0)" Date: Tue, 07 May 2024 12:53:31 +0200 Subject: [PATCH bpf-next 1/4] selftests/bpf: Handle SIGINT when creating netns Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240507-upstream-bpf-next-20240506-mptcp-subflow-test-v1-1-e2bcbdf49857@kernel.org> References: <20240507-upstream-bpf-next-20240506-mptcp-subflow-test-v1-0-e2bcbdf49857@kernel.org> In-Reply-To: <20240507-upstream-bpf-next-20240506-mptcp-subflow-test-v1-0-e2bcbdf49857@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , Andrii Nakryiko , Eduard Zingerman , Mykola Lysenko , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Shuah Khan Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, "Matthieu Baerts (NGI0)" , Geliang Tang X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1187; i=matttbe@kernel.org; h=from:subject:message-id; bh=lyRBoz5Xmhw6UZgyarafKgSfWpCH32S9g/wdv08HRjU=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBmOggukIkwZj6TYCL8FxTM3oKEpmnsX+s2yWfBf zv+Q+kmt6CJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZjoILgAKCRD2t4JPQmmg c584EACgL5qCGLUyywbDhu1TIO6ySqs4kpRCfDV1gmNFeugITDERHvC0Y/t0MApQDciodwUanek eFYdwF2cKkHp3T1K5lC1e5vrh6dFOAObk9WuyDeXCuuEJgTF8qm8eLHOw9WpdT3RZw+2pVdP9fE B5A1qF7U+qjWWD031Kx4CPo/+v6QlUruVwiFJSA0yOHWA4l5HfXFhd8jF8uH93p/OyXwmzy+BnV 8RuK+k/uFudn85WUF1x6+aygt0bDGZntYCDslsPw//HBw9Z/HpqnFpv2T0+9AF2HahVYfliNOGJ amboL9mxYBEKMDQ+dIb9ll/fglr0Ma2oyxvjDLBcmdEMNDIjsaRsgUSjUGxTOPavuvZ3sMg71VJ KBBlaPczPTVU89XKZxLE4XKCN27BmTEG1cwvFDSU/LS3bW4K03vDouwCMWxYVlB+L1q2O8ZGMBH cZfIE0ZdWXKx9OS6IVVsEiI3bRG4tckilcigatWcnuGf1nHmhBSnieGl1SPfD2GkORLC3y4bTxU zQtN6aNyLp35sQ+S0ngqwNYj8AJEpou7PUFVV7o4qERDo2peInoBFfwqVGjMjwDT0aWeEMoW1/K xuE1SwbX1WmAmrM1sXwTpC3/qpMzgFiis+XhmF9iKogYatOzDClThq8a+RW6uK4GbSqDz6ONVUx UYAiYLtzEO62bXg== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 From: Geliang Tang It's necessary to delete netns during the MPTCP bpf tests interrupt, otherwise the next tests run will fail due to unable to create netns. This patch adds a new SIGINT handle sig_int, and deletes NS_TEST in it. Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/bpf/prog_tests/mptcp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c index 274d2e033e39..baf976a7a1dd 100644 --- a/tools/testing/selftests/bpf/prog_tests/mptcp.c +++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c @@ -64,11 +64,18 @@ struct mptcp_storage { char ca_name[TCP_CA_NAME_MAX]; }; +static void sig_int(int sig) +{ + signal(sig, SIG_IGN); + SYS_NOFAIL("ip netns del %s", NS_TEST); +} + static struct nstoken *create_netns(void) { SYS(fail, "ip netns add %s", NS_TEST); SYS(fail, "ip -net %s link set dev lo up", NS_TEST); + signal(SIGINT, sig_int); return open_netns(NS_TEST); fail: return NULL; -- 2.43.0