Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp1160162lqb; Thu, 18 Apr 2024 01:41:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVisocauMw0FsxwbHh6tu6yZCNJ63rOR6wr/i/pCv2nLaBbdYExunip5MIQz/CpWxmkoFnn462dccMu4MmyGYPrslhbPV1xyflNdI0eug== X-Google-Smtp-Source: AGHT+IEcd4Xkelzx6MEmSeB0yObf+zUM/X3uH5S5vIA8IsMH0RxdnZIUrZXn/y+bTxMTDI202tm/ X-Received: by 2002:a05:622a:18a2:b0:437:ae7:3864 with SMTP id v34-20020a05622a18a200b004370ae73864mr3003555qtc.21.1713429713624; Thu, 18 Apr 2024 01:41:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713429713; cv=pass; d=google.com; s=arc-20160816; b=0aPPMAWkTFhqXKqZSVCIucG1bVDBFDWeZ4GUjd130fa8jscSGSE7FyCTZTShsWF5I7 vxNrCxFWmNsZpFiQD5r7FcLccxCXU8Fvur8gG9dfPEjHSQmRiIlpTFhS0Xv8SabptKYV owcDqEwuF0RDwmCqJWMBsz7+EqInXZZsisyQ9h1RNNfjocsRE2FGHbRepznRp2AN05uX 4eYwauIOl7MCTBrpk4Y65Z5C8BNz2f237y0K/Gnv4mw9UC6/r6W3rLMI4VO/aMTC/ZSy Zwqrs8xGAdSBPrMkixlRsfo6DpNhcLcTUhMjE6fbcU22QQnCtlE+5k3pnDWw1CJdZKn4 oUKg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:autocrypt:references :in-reply-to:date:cc:to:from:subject:message-id:dkim-signature; bh=cFbNEihV6/PeFco2xXBFktNQkAiNk5YHzWf5yzHaxsM=; fh=xmjZzHLVVDuORzqMkqQvB66ZGjzJUIqCpGtLurkTZY4=; b=NMVX2z5g23G1re0zi6Stm8rqtvKQHjYqcMh39/u/JK3P5yUgT8r5ZqnKiw3ZQ1fTFY NDQOBbTeHnb8doqRh0poW1XSavG/PjDqMEt0BmET+0wPw6f4AsYMGD79HSMtmGeJCZ5w RA1lDDCC7XCtxeV4QdMNFRQnQrMboN36LX2qXu+ebehMgz8sgT7ZNsRRt9NnZK/JZjSx Xr7sUc5WCWnjQs4zbVfhW9KXFAlBdDFYX030mnq4najoP5vtd1Now5tZLf3r67RX01Dk aYlFB84ckctFACp5jjhC67UwGvb5tEkDUFM5bOAV7QiJ1MaY+H67QwIiguSzVH3RmPcR 1Z3Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cY6jqDJQ; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-149735-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149735-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id p7-20020a05622a048700b00437964a7ce0si989884qtx.268.2024.04.18.01.41.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 01:41:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149735-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=@redhat.com header.s=mimecast20190719 header.b=cY6jqDJQ; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-149735-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149735-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 0D4D21C20D2B for ; Thu, 18 Apr 2024 08:41:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C5568158851; Thu, 18 Apr 2024 08:41:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="cY6jqDJQ" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 470201E489 for ; Thu, 18 Apr 2024 08:41:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713429704; cv=none; b=NLqb2r8RVhbWwvwiqUgdDVSf32d5wWAOebwuGpAZzgWeUF3MCy5ZX8a7bncWN7SpaT5HEnN8QLguScKHpwYfKECKXcAq2YokSQOzgzYsFyIO5yDcpZn5Csfy2ZOHIe0IohTuMZ1EL9LPmYhZoxJp8/iPZPq7uHe9b+aYCuOyfzk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713429704; c=relaxed/simple; bh=mmIqQThqr4X7osoH9eo1/TXkO6YWjRUHZTNxbSl+WsE=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=e+rGtQC7grVcp/037+9OUnzSIiPl0ut6KypuH+dpNH2uR3XdoHbUbkwZo+1YKunvoXPbR9i2T3peTKtBtxlvM0q4pvg1tB60jCMyt62Tn4jgCDLsxC9dISUvxGC0Jl1oLSiiE6xN4Bmv4+G8LWo60cv5Owr0CSDLp+oxarngk9s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=cY6jqDJQ; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713429702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=cFbNEihV6/PeFco2xXBFktNQkAiNk5YHzWf5yzHaxsM=; b=cY6jqDJQYCkfFEHfMxf3C1JEXn13Ex1T8wyZEr8m9aRdvOphh2PBs/jx6fXg566/1OUJOf NrlhIAiJyDjDWcq3QhtQZynNl3PHMHMoR1qvgAVRs083BtoXLpZ2Z4NCD8BWUZI6wzD4RQ Ktgq33x24NjJVTflrH8oAGgBV2g02ko= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-644-zn0m0t2MOFuMOVlNO4GcPQ-1; Thu, 18 Apr 2024 04:41:40 -0400 X-MC-Unique: zn0m0t2MOFuMOVlNO4GcPQ-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-349a31b3232so61690f8f.2 for ; Thu, 18 Apr 2024 01:41:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713429699; x=1714034499; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cFbNEihV6/PeFco2xXBFktNQkAiNk5YHzWf5yzHaxsM=; b=c/15k65RpYr2lKTYeWnxsSgVRmz6M1yGVuIirpXOBLaWkHF04a6baB1SVaj6lFcYav 1AdNFxau95BbiIi99kZojTIF5PRnwp51STGF72E3/mkzqCfzHx8IKel7eegojF9tEPix zxV1rqbXR8lyjh4lxDBqwIAv/EtkNakXrXQ/hiCFl4QRQDMNLl3UFCrlNxk/Zrh5pfDt CL2dNrR/o7RUfqHwB+sYtGAZxdnIK9dnqGe7Exv9lCMswSjEs4QNAKhMTN57pdXVEWCa vasgArxkE3wtVTlKrltyH1cDQiZV0pkyhdO41V5VQVC+mmzG5tsV0s8fTRWuNo3I7RXb /CLg== X-Forwarded-Encrypted: i=1; AJvYcCXO6g8m8B56G66puK0NTWNtbTxGsLdFnxdOCslN+2Yb05/N94WhnWQIr3j0HQYuQWzpuQzvUZvhybnJOHXpZ849qtFPg59+3u0zsCg0 X-Gm-Message-State: AOJu0Yzi1kpTJGS/Zi2M9fL9V79CCQtZdjQaK9x7k+EeTvySNppUQn5f msajw+acLvQDj93yIg6VvC+qGm9i1jERJpEGq1eLTPyMCEi9twomMNojyirmWcGUQAZrJ6SfhGf 6HUK5MRe+TIf8gyXXxBuuxtjEQdwGWI5YUbEIsBVChHCGNC15nqy/FmEb4VLv6Q== X-Received: by 2002:a05:600c:5101:b0:416:a773:7d18 with SMTP id o1-20020a05600c510100b00416a7737d18mr1402689wms.0.1713429699260; Thu, 18 Apr 2024 01:41:39 -0700 (PDT) X-Received: by 2002:a05:600c:5101:b0:416:a773:7d18 with SMTP id o1-20020a05600c510100b00416a7737d18mr1402665wms.0.1713429698844; Thu, 18 Apr 2024 01:41:38 -0700 (PDT) Received: from gerbillo.redhat.com (146-241-236-143.dyn.eolo.it. [146.241.236.143]) by smtp.gmail.com with ESMTPSA id q6-20020a05600c46c600b0041892857924sm1901310wmo.36.2024.04.18.01.41.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 01:41:38 -0700 (PDT) Message-ID: <90c5d1b6747d7699ebec50168672f1c435269e7f.camel@redhat.com> Subject: Re: [net-next PATCH v5 2/4] test: hsr: Move common code to hsr_common.sh file From: Paolo Abeni To: Lukasz Majewski , netdev@vger.kernel.org Cc: Andrew Lunn , Eric Dumazet , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Oleksij Rempel , Tristram.Ha@microchip.com, Sebastian Andrzej Siewior , Ravi Gunasekaran , Simon Horman , Nikita Zhandarovich , Murali Karicheri , Jiri Pirko , Dan Carpenter , Ziyang Xuan , Shigeru Yoshida , "Ricardo B. Marliere" , linux-kernel@vger.kernel.org Date: Thu, 18 Apr 2024 10:41:36 +0200 In-Reply-To: <20240415124928.1263240-3-lukma@denx.de> References: <20240415124928.1263240-1-lukma@denx.de> <20240415124928.1263240-3-lukma@denx.de> Autocrypt: addr=pabeni@redhat.com; prefer-encrypt=mutual; keydata=mQINBGISiDUBEAC5uMdJicjm3ZlWQJG4u2EU1EhWUSx8IZLUTmEE8zmjPJFSYDcjtfGcbzLPb63BvX7FADmTOkO7gwtDgm501XnQaZgBUnCOUT8qv5MkKsFH20h1XJyqjPeGM55YFAXc+a4WD0YyO5M0+KhDeRLoildeRna1ey944VlZ6Inf67zMYw9vfE5XozBtytFIrRyGEWkQwkjaYhr1cGM8ia24QQVQid3P7SPkR78kJmrT32sGk+TdR4YnZzBvVaojX4AroZrrAQVdOLQWR+w4w1mONfJvahNdjq73tKv51nIpu4SAC1Zmnm3x4u9r22mbMDr0uWqDqwhsvkanYmn4umDKc1ZkBnDIbbumd40x9CKgG6ogVlLYeJ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kHD9WF+m7dPlRVY7soqEYXylyCOXr5516upH8vVBmqweCIxXSWqPAhQq8d3hB/Ww2A0H0PBTN1REVw8pRLNApEA7C2nX6RW0XmA53PIQvAP0EAakWsqHoKZ5WdpeOcH9iVlUQhRgemQSkhfNaP9LqR1XKujlTuUTpoyT3xwAzkmSxN1nABoutHEO/N87fpIbpbZaIdinF7b9srwUvDOKsywfs5HMiUZhLKoZzCcU/AEFjQsPTATACGsWf3JYPnWxL9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Mon, 2024-04-15 at 14:49 +0200, Lukasz Majewski wrote: > Some of the code already present in the hsr_ping.sh test program can be > moved to a separate script file, so it can be reused by other HSR > functionality (like HSR-SAN) tests. >=20 > Signed-off-by: Lukasz Majewski > --- > tools/testing/selftests/net/hsr/hsr_common.sh | 96 +++++++++++++++++++ > tools/testing/selftests/net/hsr/hsr_ping.sh | 93 +----------------- > 2 files changed, 99 insertions(+), 90 deletions(-) > create mode 100644 tools/testing/selftests/net/hsr/hsr_common.sh >=20 > diff --git a/tools/testing/selftests/net/hsr/hsr_common.sh b/tools/testin= g/selftests/net/hsr/hsr_common.sh > new file mode 100644 > index 000000000000..822165391573 > --- /dev/null > +++ b/tools/testing/selftests/net/hsr/hsr_common.sh > @@ -0,0 +1,96 @@ > +# SPDX-License-Identifier: GPL-2.0 > +# Common code for HSR testing scripts > + > +ret=3D0 > +ksft_skip=3D4 > + > +sec=3D$(date +%s) > +rndh=3D$(printf %x $sec)-$(mktemp -u XXXXXX) > +ns1=3D"ns1-$rndh" > +ns2=3D"ns2-$rndh" > +ns3=3D"ns3-$rndh" Since you are touching the initialization code, please move it to using the lib.sh helpers. The above will become: setup_ns ns1 ns2 ns3 > + > +cleanup() > +{ > + local netns > + for netns in "$ns1" "$ns2" "$ns3" ;do > + ip netns del $netns > + done > +} And this: cleanup_all_ns Thanks, Paolo