Message ID | 20230616085922.3066990-4-j.granados@samsung.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1185915vqr; Fri, 16 Jun 2023 02:04:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7fs9BdE1qv2nWgnn9pP6LnH4M5HQLus00J8u88FdvPbZCFGnkTTDmEkfaZJlJoAuQvk8P0 X-Received: by 2002:a17:90a:9e1:b0:25b:d7e3:a01d with SMTP id 88-20020a17090a09e100b0025bd7e3a01dmr1204944pjo.32.1686906254541; Fri, 16 Jun 2023 02:04:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686906254; cv=none; d=google.com; s=arc-20160816; b=vAyfm9qtuCe4RcPg3Lrl4V501bnosqsYC6yf1dE9f0TzC4rOiTsFjf0EHm9f/d3Hd+ JNr2CqazYhXAKdATHTgo/5qqsAvtTBSWiB8qqfnq3Jv9ZvvFd/a8n3IvoNsKqKlU1tHE TEMOsQrsOHBNXiBizrvSqwOiu6yUUaRSlVlv9Y89RBC6kEkTbdIvcvM2MOpKHAmLuNRK RDOee3QxgdDgjnqrycZDN1/eqkoqXoC3cEj5AySA8qZFq/JsO2+gKUhtLhOoKRhCarKU 7hEgfLZKWxH/ib7S3Ay07Oi4OmGvT3tyrpN83y9dCz1JhBsnKlzFvm6wveOpaM8Y+ARR +4Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :mime-version:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=hYhRLkPi8FoDCUTYM89A2RNac7EIMazIQAo5IMuTC+s=; b=fyg6YmY/8eYTx82Azwl/kotdDTB6vIgi0Jc2sPYPijDdwXnIUjbzkjfJuFZWSFPhP+ 9hqmWjPdREuMKtNcxMWjAD6BmMuBarsEmcZMszWBVgGyBBc9HYPJA+88x1fHp+0D2I0c U2oxtvrYapGvXOXMuwh23D5bEd1/Mf9ImC/vezywSdI8nKbfrZX6X8Bfex+FzamaILVA D/qmDCV91lQ7WfKnMvtGqkZr1bChROs5nTikqCXr5lOl4YasP6dPFPe6gHdsPE0LXqX6 E4HNjL5Paa6DlmNBZDErJEoPRRiOh3+nD09TzpotVra2G48JDOx3XY7ypVSeTfUdkDsi mjDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=mVFHafhh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j7-20020a17090a31c700b002508889985fsi1141099pjf.95.2023.06.16.02.04.01; Fri, 16 Jun 2023 02:04:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=mVFHafhh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245745AbjFPJAk (ORCPT <rfc822;maxin.john@gmail.com> + 99 others); Fri, 16 Jun 2023 05:00:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245183AbjFPI7f (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 16 Jun 2023 04:59:35 -0400 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4874B1FEC for <linux-kernel@vger.kernel.org>; Fri, 16 Jun 2023 01:59:34 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20230616085933euoutp0160e124e43b0221aa53f66bcd993f2003~pGAuC95450219702197euoutp01h for <linux-kernel@vger.kernel.org>; Fri, 16 Jun 2023 08:59:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20230616085933euoutp0160e124e43b0221aa53f66bcd993f2003~pGAuC95450219702197euoutp01h DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1686905973; bh=hYhRLkPi8FoDCUTYM89A2RNac7EIMazIQAo5IMuTC+s=; h=From:To:CC:Subject:Date:In-Reply-To:References:From; b=mVFHafhhQ0RweYn15twShwBBZ46FbtZJ8usTR3F3h9T1RthAFxseggOLeBDl+hZLJ DSkNl+km/xsruFdQxRXgATygvSlvzFK6KjLlaQkkHOt5QSM+ByR2yadJQv9WQ98EKu asSMbsFktl1drzMGf3gAT35rLOnMs8VR3JPf3qYo= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20230616085932eucas1p1a8b8595d201c77f521ca9c47f9918fc5~pGAt53mE90928509285eucas1p1p; Fri, 16 Jun 2023 08:59:32 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 99.C4.11320.4742C846; Fri, 16 Jun 2023 09:59:32 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20230616085932eucas1p1d3d120da7944fc06d714035043697e4d~pGAtmNejj0512805128eucas1p11; Fri, 16 Jun 2023 08:59:32 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230616085932eusmtrp1f6928a4e49ee4e0f0b21f31506551e8f~pGAtlmZSr0890108901eusmtrp1W; Fri, 16 Jun 2023 08:59:32 +0000 (GMT) X-AuditID: cbfec7f4-97dff70000022c38-42-648c24746962 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 3B.9E.14344.4742C846; Fri, 16 Jun 2023 09:59:32 +0100 (BST) Received: from CAMSVWEXC02.scsc.local (unknown [106.1.227.72]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230616085932eusmtip22ea7cb030edfb2cec4c90444bcdd258d~pGAtcnsCH1537815378eusmtip2a; Fri, 16 Jun 2023 08:59:32 +0000 (GMT) Received: from localhost (106.210.248.231) by CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 16 Jun 2023 09:59:31 +0100 From: Joel Granados <j.granados@samsung.com> To: <mcgrof@kernel.org> CC: <linux-kselftest@vger.kernel.org>, <linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>, Joel Granados <j.granados@samsung.com> Subject: [PATCH v2 3/8] test_sysctl: Group node sysctl test under one func Date: Fri, 16 Jun 2023 10:59:17 +0200 Message-ID: <20230616085922.3066990-4-j.granados@samsung.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230616085922.3066990-1-j.granados@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [106.210.248.231] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrGIsWRmVeSWpSXmKPExsWy7djPc7olKj0pBrO7LCz27D3JYnF51xw2 i+l33rNZ3Jj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HhKaMDi8emVZ1sHp83yQUwRenZFOWXlqQqZOQXl9gqRRtaGOkZWlroGZlY6hka m8daGZkq6dvZpKTmZJalFunbJehlXJvWz1rwiLvi3o13jA2M1zi7GDk5JARMJDY9PcHexcjF ISSwlFHizrlmVoiEjMTGL1ehbGGJP9e62CCKPjJKXLp3C6pjK6PEs2lPWECq2AR0JM6/ucMM YosIiEucOL2ZEcRmFpjAKDHrEAeILSzgJTF5zxkmEJtFQFXixvVvYPW8ArYSM3bdhtomL9F2 fTpYL6eAncTjSQ3sILYQUE3j7X52iHpBiZMzIfYyA9U3b53NDGFLSBx88QLI5gCaoyzx6XkC xMhaic9/nzFOYBSZhaR7FpLuWUi6FzAyr2IUSS0tzk3PLTbSK07MLS7NS9dLzs/dxAiMqG3H fm7Zwbjy1Ue9Q4xMHIyHGCU4mJVEeJed6EoR4k1JrKxKLcqPLyrNSS0+xGgK9OZEZinR5Hxg TOeVxBuaGZgamphZGphamhkrifN6FnQkCgmkJ5akZqemFqQWwfQxcXBKNTD1sNmkycrEHV20 fNYsaVbR5SmHXnquS83wr+TV+bKsKjqOfdWM9WvFa5NEHPWOpwlofLuUzGgu/ajvTu7BVGed S+eiO5S1Tu/5utVobiuPM39dYeX8Ke43XToOC6z8nulz8s89y79C6hOUJujPzZwsxs7jOZNj wnX9o35uYYYf2D6USDUGTum6ynX83SfrXbLLrAtfJb7JiRbOvfNOTTBr3dGreloK3SYJT19v v2agtrtj21XfjWZXjZc+U2B/yLwmzmnS4md713rLLtV5nH7AOvDm5vTAhI8Pee/trDysIiIx 9fQjzY/917Nfi33SNmzeFHww/I/71IJDd95Jbw4S+Ms5/93KqP1SEr+P66xSYinOSDTUYi4q TgQAkG7KRzEDAAA= X-CMS-MailID: 20230616085932eucas1p1d3d120da7944fc06d714035043697e4d X-Msg-Generator: CA X-RootMTR: 20230616085932eucas1p1d3d120da7944fc06d714035043697e4d X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230616085932eucas1p1d3d120da7944fc06d714035043697e4d References: <20230616085922.3066990-1-j.granados@samsung.com> <CGME20230616085932eucas1p1d3d120da7944fc06d714035043697e4d@eucas1p1.samsung.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768849412973296231?= X-GMAIL-MSGID: =?utf-8?q?1768849412973296231?= |
Series |
Remove child from struct ctl_table
|
|
Commit Message
Joel Granados
June 16, 2023, 8:59 a.m. UTC
Preparation commit to add a new type of test to test_sysctl.c. We
want to differentiate between node and (sub)directory tests.
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
lib/test_sysctl.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/lib/test_sysctl.c b/lib/test_sysctl.c index e2a816d85ea2..0cf7c547d61a 100644 --- a/lib/test_sysctl.c +++ b/lib/test_sysctl.c @@ -126,9 +126,7 @@ static struct ctl_table test_table[] = { { } }; -static struct ctl_table_header *test_sysctl_header; - -static int __init test_sysctl_init(void) +static void test_sysctl_calc_match_int_ok(void) { int i; @@ -153,7 +151,13 @@ static int __init test_sysctl_init(void) for (i = 0; i < ARRAY_SIZE(match_int); i++) if (match_int[i].defined != match_int[i].wanted) match_int_ok = 0; +} +static struct ctl_table_header *test_sysctl_header; + +static int test_sysctl_setup_node_tests(void) +{ + test_sysctl_calc_match_int_ok(); test_data.bitmap_0001 = kzalloc(SYSCTL_TEST_BITMAP_SIZE/8, GFP_KERNEL); if (!test_data.bitmap_0001) return -ENOMEM; @@ -162,8 +166,18 @@ static int __init test_sysctl_init(void) kfree(test_data.bitmap_0001); return -ENOMEM; } + return 0; } + +static int __init test_sysctl_init(void) +{ + int err; + + err = test_sysctl_setup_node_tests(); + + return err; +} module_init(test_sysctl_init); static void __exit test_sysctl_exit(void)