Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp122044imm; Wed, 5 Sep 2018 22:48:04 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbrt9yZp4YvDHXvw7Q35twV35Ts0crZmS5laAH3UeAu01bDL9vMIT4pKHQ2ffPIURZ4MREv X-Received: by 2002:a63:4283:: with SMTP id p125-v6mr1177544pga.142.1536212884848; Wed, 05 Sep 2018 22:48:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536212884; cv=none; d=google.com; s=arc-20160816; b=dm07OoPEVP0URhYDqBEcISL9QSsAcHjZggCBqf4JgLK7E4/rUuSQqb08abNVrZKTij xg3QfhAjto9MP6w/h0vsLunH3N9hu9hWArATJnI5l6Z2wfCguBJGwVYoBAJMUo1/Vih8 jq33ojkFPJs6ETzWXMBP48kt/N/uPc2dAN3Wuz3nuxS2Y0foCxX3Jk7EOrLYoh/jlWxR fA6pdsuw25mAk48PjByckPXQP2EOqDatMYu7JdjvXajtLnl0/TGOVM+7CwurU7N7a8RN d4Pq7u7Vyh/2e9ouMXy9FMJal1tpvALxqQF+hK1wSL4oeqcpDum58hAqxiZB930pzUNb ARKw== 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:in-reply-to :mime-version:user-agent:date:message-id:from:references:to:subject; bh=uALcv80e8X4QAsIn0RXQjeeW+6qfBDH8QH4gm1EMR7I=; b=VDTT3b2XI9Iri2H4ZCeBF5ZJioYx/FXJHm+CdBJxKswsVdsU5Q6LKvhor6pBwO/ed7 ngO8NBeS4phpzlHC6k3tFr6pL2XbTnJ69eCsC5iyg2/qxASzcgZtLlKHJnNWgww2MuCU VRPp4CuFLBJlui35f9z/KhNJAI/xrs94OTtVXg48hTA6WWsyzUGYXtzuZRBapx4VuxPr S9FSzT4cjexS4hrhZ0HGn+wZCiKk4MGPyLAZFJyACu6HRDG+sIu3rk1+z3tAS908uIsd hRgIqNHoYifmG/Ch2j/GhWz6EePlPT7qGlpG6AzzmieqVRM8U9gLAjSQkUWwOA8Hn5Zi SbGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m13-v6si4252425pgk.251.2018.09.05.22.47.49; Wed, 05 Sep 2018 22:48:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726583AbeIFKUD (ORCPT + 99 others); Thu, 6 Sep 2018 06:20:03 -0400 Received: from mail1.windriver.com ([147.11.146.13]:46427 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725850AbeIFKUD (ORCPT ); Thu, 6 Sep 2018 06:20:03 -0400 Received: from ALA-HCA.corp.ad.wrs.com ([147.11.189.40]) by mail1.windriver.com (8.15.2/8.15.1) with ESMTPS id w865k4EQ016554 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 5 Sep 2018 22:46:04 -0700 (PDT) Received: from [128.224.162.194] (128.224.162.194) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 5 Sep 2018 22:46:03 -0700 Subject: Re: [PATCH] sysctl: kselftests: use kernel module instead of built-in To: Shuah Khan , , , References: <1536114044-31236-1-git-send-email-Lei.Yang@windriver.com> <8aeffc5f-ed8c-b418-5db3-ef0299456002@kernel.org> From: lei yang Message-ID: <9bbc49fe-5043-d03e-a359-215e71ed3a42@windriver.com> Date: Thu, 6 Sep 2018 13:48:02 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <8aeffc5f-ed8c-b418-5db3-ef0299456002@kernel.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [128.224.162.194] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018年09月06日 00:47, Shuah Khan wrote: > On 09/04/2018 08:20 PM, Lei Yang wrote: >> It uses modprobe $TEST_DRIVER in sysctl.sh, so update >> config to use "m" instead >> >> Signed-off-by: Lei Yang >> --- >> tools/testing/selftests/sysctl/config | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/tools/testing/selftests/sysctl/config b/tools/testing/selftests/sysctl/config >> index 6ca1480..fc263ef 100644 >> --- a/tools/testing/selftests/sysctl/config >> +++ b/tools/testing/selftests/sysctl/config >> @@ -1 +1 @@ >> -CONFIG_TEST_SYSCTL=y >> +CONFIG_TEST_SYSCTL=m >> > What happens if it is a built-in? Can you elaborate in the changelog > > On that note we might have other cases that do modprobe in scripts and > run into the same issue you are trying to solve. :) I double-checked again, found that it doesn't work on either with built-in or kernel module if it's built-in, modprobe test_sysctl still return 0, so it doesn't matter it's a built-in or module. but the problem is that test_modprobe check module load before modprobe execute , I'll sent a V2 patch to fix this and keep its build-in config untouched if changes nothing 1) when CONFIG_TEST_SYSCTL=y root@intel-x86-64:/tmp/sysctl# ./sysctl.sh Checking production write strict setting ... ok ./sysctl.sh: /sys/module/test_sysctl/ not present You must have the following enabled in your kernel: CONFIG_TEST_SYSCTL=y root@intel-x86-64:/tmp/sysctl# zcat /proc/config.gz |grep TEST_SYS CONFIG_TEST_SYSCTL=y 2) when CONFIG_TEST_SYSCTL=m root@intel-x86-64:/tmp/sysctl# ./sysctl.sh Checking production write strict setting ... ok ./sysctl.sh: /sys/module/test_sysctl/ not present You must have the following enabled in your kernel: CONFIG_TEST_SYSCTL=y root@intel-x86-64:/tmp/sysctl# zcat /proc/config.gz |grep TEST_SYS CONFIG_TEST_SYSCTL=m Lei > thanks, > -- Shuah