Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3754354pxu; Sun, 11 Oct 2020 23:20:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJ/6wUK/EpJ3Ti5Rkvf14WYH33IqatKam/oVLAJJ3uQvvQLAdsybEU+BDiPXEU9P72lJ6B X-Received: by 2002:a05:6402:b91:: with SMTP id cf17mr12430281edb.130.1602483658637; Sun, 11 Oct 2020 23:20:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602483658; cv=none; d=google.com; s=arc-20160816; b=tu/FD6QUx7xU1h1oqLzCoptirCS1aqy/Gk0VWmfvNuwBz+oO7pYSqOnd8Rq0EjVlw5 UJF/3YgDiKym8nuW9EOCFbNFngz8uNfeIfQH0aj8q8nsLsJ4ywEQWLgJO8Z2Gbyr2Yeu Av1FKoSOiRlvhmgQhhFeRcRhpmzZLnBqQA3QKX/h8PKmRZ0KLJWqWAR5xumwTNR2Wnc0 08Px7D3aALoTSN+nPHotC9RpXKEHHsJ6ZlOoEAVtHG2BeblVuhqeOfYZ7GSO3dKGH11x H34fvh9Wvudij21qxh8bdzG2d4bG1U96HTmrm2WC/9iTQ8rTwxlJNe/R9eHyqtm9OCkD DRDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=MG6dr6dkYjbuidZHOqbfSuEQ8chzRGiJ/r5QM2M/mPI=; b=lpi4e93iDe56xdlvTuwq9vTyjCDfgxL4eBMAWrME0tGdwGx65ZJOTYLGDZqtvOYJzG 1Orj+AixoL2I2mmFTxNwHn4EldqrM5G3Fn8xHwM6NVAFonpTyNsgTYIFfhDjRGH29XbM tZycHKFtZCBeqvZljHbEQwr3Uw9lDNU8AkoeaGZPoHWwhA8/UiwpAU+oVk/SwNT/dDVI +ItjfIkT9i6jV8jg2VmR4SkbIixeQIB7ktj7qcKM9Ng85C7kdXJ5JUIe83fClXYYEPrw CrhskkMJ7NGOaZd2nDq1RyyOWCKpOqo/m6YkglmjB736g1+Rx02ByqXJ8DR/1rfNmszo 9AXQ== 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 e5si8982943edc.186.2020.10.11.23.20.35; Sun, 11 Oct 2020 23:20:58 -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 S1726620AbgJLF4a (ORCPT + 99 others); Mon, 12 Oct 2020 01:56:30 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:36377 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726527AbgJLF4a (ORCPT ); Mon, 12 Oct 2020 01:56:30 -0400 Received: from mail-lj1-f199.google.com ([209.85.208.199]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kRqou-0002CI-0A for linux-kernel@vger.kernel.org; Mon, 12 Oct 2020 05:56:28 +0000 Received: by mail-lj1-f199.google.com with SMTP id 26so6113120ljp.19 for ; Sun, 11 Oct 2020 22:56:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MG6dr6dkYjbuidZHOqbfSuEQ8chzRGiJ/r5QM2M/mPI=; b=JfJJzyrwdXE1SAr4PHOMufI0/xDKZQllCIYwP+uQfu/ZzQjc9/P266MSvkWMSAJLet k2C7k4fpmRXqz7alswMnxI9WZ85/8Nmfn1z2drMCi+2CudRYDV7r5Mvqd+ToFWfiPos8 bsvKo8YVITiT6DTDqHpsDpJEHlZSpuxSFB3W+ktaLKd616s/n01xtHfa6jQkg2zlFIpG DNj0adVQgecKBdliSf29k7O7e/p2OuPnk2EvSP3I//QGECFB/EudS9ePSXYD52KHzDof 62ZYjDJ41XsgURxyYTIrOTN7SmIVO07lHK0V8IiNin0kOMzdz3yupvLs1qW9pcg668Xb kDwg== X-Gm-Message-State: AOAM530Ija4l3z3ty7YCqRyOOy355U7GR62T10CP6Ho4rDzkxAMTqTLy OxHSQFY3GiqZ1pXftQMFoYBs3/OdEayRP/SMXdadt1BIQFfs+Afm2fH4vftx7uHojlY3tD5fzTB +KRsxXgG4ZpSdQnJQ2yCveSKjsm9IzMeuHZANa4JOtXJqEpPNBSYzGv3O X-Received: by 2002:ac2:5e6c:: with SMTP id a12mr1947635lfr.568.1602482187421; Sun, 11 Oct 2020 22:56:27 -0700 (PDT) X-Received: by 2002:ac2:5e6c:: with SMTP id a12mr1947631lfr.568.1602482187140; Sun, 11 Oct 2020 22:56:27 -0700 (PDT) MIME-Version: 1.0 References: <20200907035010.9154-1-po-hsu.lin@canonical.com> <20200907131217.61643ada@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: From: Po-Hsu Lin Date: Mon, 12 Oct 2020 13:56:15 +0800 Message-ID: Subject: Re: [PATCHv3] selftests: rtnetlink: load fou module for kci_test_encap_fou() test To: Jakub Kicinski Cc: David Miller , Shuah Khan , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Is there any update on this patch? Thanks! PHLin On Fri, Sep 18, 2020 at 6:39 PM Po-Hsu Lin wrote: > > Hello folks, > > any thoughts on this patch? > It can make the test pass and reduce the failure numbers in > kselftests, it will be great to have this applied. > > Thanks > PHLin > > > On Tue, Sep 8, 2020 at 2:57 PM Po-Hsu Lin wrote: > > > > On Tue, Sep 8, 2020 at 4:12 AM Jakub Kicinski wrote: > > > > > > 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. > > > > > Hello Jakub, > > Thanks for your feedback. > > > > For this case I think it's safe to remove the module here, as it was > > never loaded before and thus causing this test to fail. > > If other tests in this rtnetlink.sh need this fou module, we should be > > able to spot those failures too, however this is the only failure as I > > can see. > > (pmtu.sh will need fou module to run as well, but it will be loaded there.) > > > > Shouldn't we insert the required module whenever the test needs it? So > > that we can run the test itself directly, without depending on other > > tests. > > Also, I can see modules for tests were being unloaded in other tests as well. > > > > Thanks > > > > > > echo "PASS: fou" > > > > } > > > > > > >