Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3445453pxk; Mon, 7 Sep 2020 13:14:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+1b4b5d3zz0A3BGzeUqM/nS+4X5tH9Myx4VioxEOMcWG76b89jEYDoK+1U0n5IxvGbvSh X-Received: by 2002:a17:906:f2cd:: with SMTP id gz13mr5318298ejb.19.1599509648468; Mon, 07 Sep 2020 13:14:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599509648; cv=none; d=google.com; s=arc-20160816; b=Tw8avo77mGvDnPD+try/Xj7UeKBAr9JOCSiA6JZMkS+1IvVjj8SPIM+x/vqwmQhsNe KApT2euFyNQLcGYgPzKEc4ExrJY1OdJeez5N7u3zHgtb78+vdbiHgximt9xYxe6h7jua ijch97iYx7rRbzD530fJpEmuJuWuB5KY7Lvx4UGbahJQv7WLpxvHgdjwGq0RfKNiWOiV IyQvjbzyftI+SbzQAV4t/uLHMqfPuTyHQikWCbqYF+7aUhJsxQ7wai+ndUFj/VxHD00V JrALtBn0ytOLaVwiT50J2qvhInhJqiia1WsN3IAoxKwg9WEY5Zh5f3ec3tm6AQLz7wgx w63Q== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=lgI/rI73TlkAB1+IY04jzsqwQ5xEHeeu2yzKI4nrpEg=; b=XScSEVhinmci/TxhUpr4bLdwdOH+AbPJGxD+hNAUGiCXeXIfRHgFfgvWbwBxuhZnK5 LzoXoFLtQmT2aRHvMmGq/AUsF0/+I7iekumJ6QjlCi5moGaejTvPnb+1KnqOul0B7AZn G5oeJ71yaMzeCe+f/20UBdouzlC0zfP7hOZsN9bdC9rq6D1xo2KrI04s2akmOrJFOS9N GM7EY/HGuWgI9RvAteTJwe97lEOQfLacBlZ25ZqTFicwCugItekRu0oq3s+TXVTRgZzB S8NPNU2+FdrsCBLWPPD2eZazRk5xtFvXcwupHhuojcm719q/hOx5LzziXyDidWNEseAK 0rXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KKif5jRX; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id yj16si4779294ejb.592.2020.09.07.13.13.44; Mon, 07 Sep 2020 13:14:08 -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; dkim=pass header.i=@kernel.org header.s=default header.b=KKif5jRX; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729240AbgIGUMX (ORCPT + 99 others); Mon, 7 Sep 2020 16:12:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:37782 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728834AbgIGUMV (ORCPT ); Mon, 7 Sep 2020 16:12:21 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7271921556; Mon, 7 Sep 2020 20:12:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599509540; bh=EOaPtAh03DeyQBLF3axC14+NF/h3MulP7m20/5/Q5C8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KKif5jRX8IOQ8WTb4utcN3D8+wCpPYWY2XIAkT80zR4sHa9khMmoUJgrVkFSRgVJj 6Wcn6cr07ZkKlwuCBD3vrniXrzWm6JKKDw8PiDdL/bzw8oPngw040M78WzsOFDICmE +BtmCr1sAzo7cEjqL2ton0nsI3i8Zl2qSoXCgZq8= Date: Mon, 7 Sep 2020 13:12:17 -0700 From: Jakub Kicinski To: Po-Hsu Lin Cc: davem@davemloft.net, skhan@linuxfoundation.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCHv3] selftests: rtnetlink: load fou module for kci_test_encap_fou() test Message-ID: <20200907131217.61643ada@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20200907035010.9154-1-po-hsu.lin@canonical.com> References: <20200907035010.9154-1-po-hsu.lin@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 7 Sep 2020 11:50:10 +0800 Po-Hsu Lin wrote: > The kci_test_encap_fou() test from kci_test_encap() in rtnetlink.sh > needs the fou module to work. Otherwise it will fail with: > > $ ip netns exec "$testns" ip fou add port 7777 ipproto 47 > RTNETLINK answers: No such file or directory > Error talking to the kernel > > Add the CONFIG_NET_FOU into the config file as well. Which needs at > least to be set as a loadable module. > > Signed-off-by: Po-Hsu Lin > diff --git a/tools/testing/selftests/net/rtnetlink.sh b/tools/testing/selftests/net/rtnetlink.sh > index 7c38a90..a711b3e 100755 > --- a/tools/testing/selftests/net/rtnetlink.sh > +++ b/tools/testing/selftests/net/rtnetlink.sh > @@ -520,6 +520,11 @@ kci_test_encap_fou() > return $ksft_skip > fi > > + if ! /sbin/modprobe -q -n fou; then > + echo "SKIP: module fou is not found" > + return $ksft_skip > + fi > + /sbin/modprobe -q fou > ip -netns "$testns" fou add port 7777 ipproto 47 2>/dev/null > if [ $? -ne 0 ];then > echo "FAIL: can't add fou port 7777, skipping test" > @@ -540,6 +545,7 @@ kci_test_encap_fou() > return 1 > fi > > + /sbin/modprobe -q -r fou I think the common practice is to not remove the module at the end of the test. It may be used by something else than the test itself. > echo "PASS: fou" > } >