Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1843696ybh; Tue, 14 Jul 2020 08:43:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzN8+7fdAi/shtC67QtXV4KMhRfoJ/LoFT4xUUY1QbXihC8oT2xd5yC8OA0e5gDxsztRXjT X-Received: by 2002:a17:906:da0f:: with SMTP id fi15mr4904558ejb.237.1594741435438; Tue, 14 Jul 2020 08:43:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594741435; cv=none; d=google.com; s=arc-20160816; b=0cfKcuAVItdRfKHMYehRETjEDb9xTeHDfYiPQ3slnlVfGPVeQR11oIxGLmT1TujHvL jBBuudosLvu+fOUDYbqMBHLAnU+NI+NDmIdPdkobde37tSFmuNmpHocw8u8FMjVxp/N2 NLSpBzqj+gWNfgo+gs5vxpSMqlQFuLAnZs8yW23ScE6LtyVc43i0nLkEs3a3a/LJbaVV npeFwJnZpzK6kI+7mHiHQbFBktL1uVBve7dyMTjXwD9FAzVtqcA8RAwUF0qZHbmPkvxo UKu8vEWBrkGw2VnhQyI1D9JCoW3qxAVDVnNYKMQ8oCo+nGl6S5yE4SOcgGpPyskyiUh7 MywQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=NQFaFIaWBzHDVOp7TP+bS3v79Dk4NxyDZKrSE0p35b8=; b=yzyjTBRIIuvnVhHw0qj0LjAPzzpKV3oJPlPFtyAuxmYLykdlnvq0qONogKIlk8d02O RejNYetas0oFzA5fVPhRietmJnWqtqIHldGiyJ9V1FvNcl2U6KTm2BOilkgQMoIHABIR Kj3WQ+d0OHPXqGtX5D+boOJEx4TQV4D49NZ7c/2T9TyGFg/BlwlXXSnhQqSN63qz9SRv ya08nCfYnxhUjULOTCLVs195rjsin3s5K2NqM9u21IfGzQwGrzaF942s3N4tSCqrnubf dbFfoVylKTgIrsF9fnXpLAC8vetM1d+kfpmINtp3BKFP4VL+RJaf3StMU7RJIXaKrlVe XGlg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e6si11378692ejt.528.2020.07.14.08.43.31; Tue, 14 Jul 2020 08:43:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727049AbgGNPlD (ORCPT + 99 others); Tue, 14 Jul 2020 11:41:03 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:39814 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725876AbgGNPlC (ORCPT ); Tue, 14 Jul 2020 11:41:02 -0400 Received: from 1.general.ppisati.uk.vpn ([10.172.193.134] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jvN39-0003Lt-JJ; Tue, 14 Jul 2020 15:40:55 +0000 From: Paolo Pisati To: "David S . Miller" , Jakub Kicinski , Shuah Khan Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] selftests: fib_nexthop_multiprefix: fix cleanup() netns deletion Date: Tue, 14 Jul 2020 17:40:55 +0200 Message-Id: <20200714154055.68167-1-paolo.pisati@canonical.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org During setup(): ... for ns in h0 r1 h1 h2 h3 do create_ns ${ns} done ... while in cleanup(): ... for n in h1 r1 h2 h3 h4 do ip netns del ${n} 2>/dev/null done ... and after removing the stderr redirection in cleanup(): $ sudo ./fib_nexthop_multiprefix.sh ... TEST: IPv4: host 0 to host 3, mtu 1400 [ OK ] TEST: IPv6: host 0 to host 3, mtu 1400 [ OK ] Cannot remove namespace file "/run/netns/h4": No such file or directory $ echo $? 1 and a non-zero return code, make kselftests fail (even if the test itself is fine): ... not ok 34 selftests: net: fib_nexthop_multiprefix.sh # exit=1 ... Signed-off-by: Paolo Pisati --- tools/testing/selftests/net/fib_nexthop_multiprefix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/fib_nexthop_multiprefix.sh b/tools/testing/selftests/net/fib_nexthop_multiprefix.sh index 9dc35a16e415..51df5e305855 100755 --- a/tools/testing/selftests/net/fib_nexthop_multiprefix.sh +++ b/tools/testing/selftests/net/fib_nexthop_multiprefix.sh @@ -144,7 +144,7 @@ setup() cleanup() { - for n in h1 r1 h2 h3 h4 + for n in h0 r1 h1 h2 h3 do ip netns del ${n} 2>/dev/null done -- 2.25.1