Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6313927rdb; Thu, 14 Dec 2023 14:51:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IEM7B7EEVp3ea5AhiNVGLSvuiv9Vvg1wESLZwfky2B45+ahRT+a2ZWwo7/iSBl4LdbPMkGr X-Received: by 2002:a05:6a20:5491:b0:190:9280:7260 with SMTP id i17-20020a056a20549100b0019092807260mr12961968pzk.60.1702594287324; Thu, 14 Dec 2023 14:51:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702594287; cv=none; d=google.com; s=arc-20160816; b=IBYcAAebC60OrjpKGNa0jrbsXhVWYQ/0segGJTki5G4Et4UWpIbEljrWsDUiOilN0A CArmUCFguthJSWq+54ghQZBFHT7auuBUSI+uigbqBPViHmLCgZDk6lRndd/dPef04PjZ 5q7Tah69IDG3Mw7EfugPDDya2l/jsp3OupHCnrLnySpe0wGkKBPxJOpbXyjHagJzd7Yn DuYSBjSRff7CIvCJ5YwnmwnFmkZvMbGoCf9ZMeZN2W1IH0v7ILqWF1ZT5XejzpkICXPO SjJgZIIRDXSXBxhGgYA5x1dZG7pm3Asf9/yIydRii2ncpbT+3BeA2I6nqrLK0MuIEkrX y/fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:feedback-id:dkim-signature:dkim-signature; bh=mulrQKzv1eO6blHCVRuuCfG2CgE/rU/CR7wkoBWNDIE=; fh=k81VAqUDzw6AaG4zBP0PxURiZHyHCAcce885ILTrtmY=; b=SaJ40dSXNb73r7cFnFTbDlenWZdRxgtSFr/05bDlTMKTqhmRaGvsnFVavHKbqzxcSz BzR93/OXH9BnGsgOtrIq16DQtGgrMGhMYmSb71P5bnPLUOkmGkkycq6Mmkdcvl9jvkF9 xmlVvV6uliyctvOkJiAIMV2VNmHeZfGjUS2SL2SWat0vrL4Sd8taYJh7V4VOhA7Z5sJP JruLOOqjp+B295iIniXEo1d0Ies4PMPumb/NNUjW7VFGQtFYHGpDkaGy3usJk4k2BJ2r 0EpHZDA/v6kJpQCdZ0ejLslwcDeQg3Z6i3BNNTzp3plp+UZp65o4nBs5ebi95ns6EInl yM+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm3 header.b=Uj5gJdC9; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Cr2GauC9; spf=pass (google.com: domain of linux-kernel+bounces-212-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id bk5-20020a056a02028500b005c5e26ed226si12651089pgb.429.2023.12.14.14.51.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 14:51:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm3 header.b=Uj5gJdC9; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Cr2GauC9; spf=pass (google.com: domain of linux-kernel+bounces-212-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212-linux.lists.archive=gmail.com@vger.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id BE4C3B217C1 for ; Thu, 14 Dec 2023 22:50:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B70536E59A; Thu, 14 Dec 2023 22:49:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dxuuu.xyz header.i=@dxuuu.xyz header.b="Uj5gJdC9"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Cr2GauC9" X-Original-To: linux-kernel@vger.kernel.org Received: from wnew1-smtp.messagingengine.com (wnew1-smtp.messagingengine.com [64.147.123.26]) (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 372106E2BD; Thu, 14 Dec 2023 22:49:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dxuuu.xyz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dxuuu.xyz Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.west.internal (Postfix) with ESMTP id 1811F2B006D1; Thu, 14 Dec 2023 17:49:26 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 14 Dec 2023 17:49:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dxuuu.xyz; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1702594165; x= 1702601365; bh=mulrQKzv1eO6blHCVRuuCfG2CgE/rU/CR7wkoBWNDIE=; b=U j5gJdC9rCeY1LKWg6b9hicDpA/zmiBIzY71FqFFLvQlx6DOD+MKVBYeZvovOE1Zx J5rOMvn/7nCxjNc5pKpLrm7GL8Cjholif/D8jga6365oDBKjNfkvejqyp1MO+1Uf Uny+iLMQRxTmF4/C/8tm9U/mztuo36uIAMTmfBvoC5MJPWFi9hGyROq/bjrbO/It 8LhSP2Iz9lqk7R8uMTFqpxL+agepeVG6iN9Kh5mV1+aA/Pecz9YjZRE/b1OGKP6v i1WUH9gVAOL4uUIl0+3zEoFHAqR1LM/PL6B5Mx6hzPolMIPZ2l2PQ2KWxpYoH+bK s/WgC98ETOfrXVxMnomPw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1702594165; x= 1702601365; bh=mulrQKzv1eO6blHCVRuuCfG2CgE/rU/CR7wkoBWNDIE=; b=C r2GauC9xapi01LdsOwfk+mFgIrMjpN1xmCrGBaW0Ls0Lq65IiSGwZQ3H75JnEzS0 O4iiwCPm3sYg21c4NZQC40avpOPGgg2Tj+o2VCvoJ8q3LCv+2TtzRzeurRvjj+gA jd2ezA/WR5yG2mlGuSx56j9Wl+RuKp48rMWSFde5clxPuy9yXDye0Yfn2WX8vhOP 4cHRd/o9QZjRocYz+juumEyQRhVyC3evD3+d83TjJA7LF7HjTemyqJyxgcJiX+g0 VTuH47E35VclRebmqf5vpYzaLsCw3NxihBR0VluCG4hvEAJ/tKO6TkLPsRW0fsn9 q2H568ofdnrvojv9xpzrg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvddttddgtddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpefhvf evufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeffrghnihgvlhcuighuuceo ugiguhesugiguhhuuhdrgiihiieqnecuggftrfgrthhtvghrnhepgfefgfegjefhudeike dvueetffelieefuedvhfehjeeljeejkefgffeghfdttdetnecuvehluhhsthgvrhfuihii vgepudenucfrrghrrghmpehmrghilhhfrhhomhepugiguhesugiguhhuuhdrgiihii X-ME-Proxy: Feedback-ID: i6a694271:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 14 Dec 2023 17:49:23 -0500 (EST) From: Daniel Xu To: daniel@iogearbox.net, andrii@kernel.org, ast@kernel.org, shuah@kernel.org, steffen.klassert@secunet.com, antony.antony@secunet.com, alexei.starovoitov@gmail.com, yonghong.song@linux.dev, eddyz87@gmail.com, eyal.birger@gmail.com Cc: mykolal@fb.com, martin.lau@linux.dev, song@kernel.org, john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com, haoluo@google.com, jolsa@kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, devel@linux-ipsec.org, netdev@vger.kernel.org Subject: [PATCH bpf-next v6 2/5] bpf: selftests: test_tunnel: Setup fresh topology for each subtest Date: Thu, 14 Dec 2023 15:49:03 -0700 Message-ID: <0fb59fa16fb58cca7def5239df606005a3e8dd0e.1702593901.git.dxu@dxuuu.xyz> X-Mailer: git-send-email 2.42.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This helps with determinism b/c individual setup/teardown prevents leaking state between different subtests. Signed-off-by: Daniel Xu --- tools/testing/selftests/bpf/prog_tests/test_tunnel.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/bpf/prog_tests/test_tunnel.c b/tools/testing/selftests/bpf/prog_tests/test_tunnel.c index d149ab98798d..b57d48219d0b 100644 --- a/tools/testing/selftests/bpf/prog_tests/test_tunnel.c +++ b/tools/testing/selftests/bpf/prog_tests/test_tunnel.c @@ -535,23 +535,20 @@ static void test_ipip_tunnel(enum ipip_encap encap) #define RUN_TEST(name, ...) \ ({ \ if (test__start_subtest(#name)) { \ + config_device(); \ test_ ## name(__VA_ARGS__); \ + cleanup(); \ } \ }) static void *test_tunnel_run_tests(void *arg) { - cleanup(); - config_device(); - RUN_TEST(vxlan_tunnel); RUN_TEST(ip6vxlan_tunnel); RUN_TEST(ipip_tunnel, NONE); RUN_TEST(ipip_tunnel, FOU); RUN_TEST(ipip_tunnel, GUE); - cleanup(); - return NULL; } -- 2.42.1