From patchwork Tue Dec 5 06:16:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang Xu \\(Fujitsu\\)" X-Patchwork-Id: 1871832 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=patchwork.ozlabs.org) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Skr0r5g7Tz1ySd for ; Tue, 5 Dec 2023 17:17:16 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id D69E13CBF7C for ; Tue, 5 Dec 2023 07:17:13 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [IPv6:2001:4b78:1:20::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 212BC3CBF77 for ; Tue, 5 Dec 2023 07:16:57 +0100 (CET) Received: from esa3.hc1455-7.c3s2.iphmx.com (esa3.hc1455-7.c3s2.iphmx.com [207.54.90.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by in-3.smtp.seeweb.it (Postfix) with ESMTPS id 8C76F1A00930 for ; Tue, 5 Dec 2023 07:16:54 +0100 (CET) X-IronPort-AV: E=McAfee;i="6600,9927,10914"; a="142060753" X-IronPort-AV: E=Sophos;i="6.04,251,1695654000"; d="scan'208";a="142060753" Received: from unknown (HELO oym-r1.gw.nic.fujitsu.com) ([210.162.30.89]) by esa3.hc1455-7.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2023 15:16:53 +0900 Received: from oym-m4.gw.nic.fujitsu.com (oym-nat-oym-m4.gw.nic.fujitsu.com [192.168.87.61]) by oym-r1.gw.nic.fujitsu.com (Postfix) with ESMTP id 385BCE8BF9 for ; Tue, 5 Dec 2023 15:16:50 +0900 (JST) Received: from kws-ab3.gw.nic.fujitsu.com (kws-ab3.gw.nic.fujitsu.com [192.51.206.21]) by oym-m4.gw.nic.fujitsu.com (Postfix) with ESMTP id 66A9E28726 for ; Tue, 5 Dec 2023 15:16:49 +0900 (JST) Received: from edo.cn.fujitsu.com (edo.cn.fujitsu.com [10.167.33.5]) by kws-ab3.gw.nic.fujitsu.com (Postfix) with ESMTP id D782820076295 for ; Tue, 5 Dec 2023 15:16:48 +0900 (JST) Received: from rhel93GA.g08.fujitsu.local (unknown [10.167.221.71]) by edo.cn.fujitsu.com (Postfix) with ESMTP id 8AA8B1A0071; Tue, 5 Dec 2023 14:16:48 +0800 (CST) From: Yang Xu To: ltp@lists.linux.it Date: Tue, 5 Dec 2023 01:16:37 -0500 Message-Id: <20231205061639.68656-1-xuyang2018.jy@fujitsu.com> X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-TM-AS-Product-Ver: IMSS-9.1.0.1417-9.0.0.1002-28038.005 X-TM-AS-User-Approved-Sender: Yes X-TMASE-Version: IMSS-9.1.0.1417-9.0.1002-28038.005 X-TMASE-Result: 10--4.742400-10.000000 X-TMASE-MatchedRID: JUGAxiLh1cMJoDeiZ6YZhKzGfgakLdjaFlIP4ZuPPcieEPi9wVyFrtKD G5MND8uRxQpkW8mbnN+hH3kE6Tg1fLVQ6XPWwtdyEXjPIvKd74BMkOX0Uoduuc+FtP9CIg3lmpH BBD3V5Wy9nMtClKxHtPJcAJWYjOv3HxPMjOKY7A8LbigRnpKlKZx+7GyJjhAUFxiw90guk/tFwX YguRPLjGfWzizl3Prbu4EkA2Rg4a2WYzUH0sWt2uJDaybX6It20OYTPaKJ4er/1MEiACvrqiCo1 uO6LMkOmw0Qaktp+ussz+cQMs/Tnp75MOLIf/j3DF+QsB+Q01JoBmTSwRxjXg== X-TMASE-SNAP-Result: 1.821001.0001-0-1-22:0,33:0,34:0-0 X-Virus-Scanned: clamav-milter 1.0.1 at in-3.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-3.smtp.seeweb.it Subject: [LTP] [PATCH 1/3] libltpswap: Add get_maxswapfiles api X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Current, the kernel constant MAX_SWAPFILES value is calculated as below ------------------------------------ //#ifdef CONFIG_DEVICE_PRIVATE //#define SWP_DEVICE_NUM 4 //#else //#define SWP_DEVICE_NUM 0 //#endif //#ifdef CONFIG_MIGRATION //#define SWP_MIGRATION_NUM 3 //#else //#define SWP_MIGRATION_NUM 0 //#ifdef CONFIG_MEMORY_FAILURE //#define SWP_HWPOISON_NUM 1 //#else //#define SWP_HWPOISON_NUM 0 //#endif //#define SWP_PTE_MARKER_NUM 1 //#define MAX_SWAPFILES_SHIFT 5 //#define MAX_SWAPFILES \ // ((1 << MAX_SWAPFILES_SHIFT) - SWP_DEVICE_NUM - \ // SWP_MIGRATION_NUM - SWP_HWPOISON_NUM - \ // SWP_PTE_MARKER_NUM) ------------------------------------ Also, man-pages missed something after 5.14 kernel. I have sent two patches to add it. Signed-off-by: Yang Xu --- include/libswap.h | 6 ++++++ libs/libltpswap/libswap.c | 41 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/include/libswap.h b/include/libswap.h index d4b5301a5..2cab1047d 100644 --- a/include/libswap.h +++ b/include/libswap.h @@ -21,4 +21,10 @@ int make_swapfile(const char *swapfile, int safe); * we are testing on. */ void is_swap_supported(const char *filename); + +/* + * Get kernel constant MAX_SWAPFILES value + */ +unsigned int get_maxswapfiles(void); + #endif /* __LIBSWAP_H__ */ diff --git a/libs/libltpswap/libswap.c b/libs/libltpswap/libswap.c index a4427736f..54317c627 100644 --- a/libs/libltpswap/libswap.c +++ b/libs/libltpswap/libswap.c @@ -11,6 +11,7 @@ #include "tst_test.h" #include "libswap.h" #include "lapi/syscalls.h" +#include "tst_kconfig.h" /* * Make a swap file @@ -63,3 +64,43 @@ void is_swap_supported(const char *filename) if (TST_RET == -1) tst_brk(TFAIL | TTERRNO, "swapoff on %s failed", fstype); } + +/* + * Get kernel constant MAX_SWAPFILES value + */ +unsigned int get_maxswapfiles(void) +{ + unsigned int max_swapfile = 32; + unsigned int swp_migration_num = 0, swp_hwpoison_num = 0, swp_device_num = 0, swp_pte_marker_num = 0; + struct tst_kconfig_var migration_kconfig = TST_KCONFIG_INIT("CONFIG_MIGRATION"); + struct tst_kconfig_var memory_kconfig = TST_KCONFIG_INIT("CONFIG_MEMORY_FAILURE"); + struct tst_kconfig_var device_kconfig = TST_KCONFIG_INIT("CONFIG_DEVICE_PRIVATE"); + struct tst_kconfig_var marker_kconfig = TST_KCONFIG_INIT("CONFIG_PTE_MARKER"); + + tst_kconfig_read(&migration_kconfig, 1); + tst_kconfig_read(&memory_kconfig, 1); + tst_kconfig_read(&device_kconfig, 1); + tst_kconfig_read(&marker_kconfig, 1); + + if (migration_kconfig.choice == 'y') { + if (tst_kvercmp(5, 19, 0) < 0) + swp_migration_num = 2; + else + swp_migration_num = 3; + } + + if (memory_kconfig.choice == 'y') + swp_hwpoison_num = 1; + + if (device_kconfig.choice == 'y') { + if (tst_kvercmp(5, 14, 0) >= 0) + swp_device_num = 4; + } + + if (marker_kconfig.choice == 'y') { + if (tst_kvercmp(5, 19, 0) < 0) + swp_pte_marker_num = 1; + } + + return max_swapfile - swp_migration_num - swp_hwpoison_num - swp_device_num - swp_pte_marker_num; +} From patchwork Tue Dec 5 06:16:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang Xu \\(Fujitsu\\)" X-Patchwork-Id: 1871831 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=patchwork.ozlabs.org) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Skr0c3z7Wz1ySd for ; Tue, 5 Dec 2023 17:17:03 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 5F6623CC041 for ; Tue, 5 Dec 2023 07:16:59 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [IPv6:2001:4b78:1:20::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 98DE73CBF77 for ; Tue, 5 Dec 2023 07:16:57 +0100 (CET) Received: from esa11.hc1455-7.c3s2.iphmx.com (esa11.hc1455-7.c3s2.iphmx.com [207.54.90.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by in-7.smtp.seeweb.it (Postfix) with ESMTPS id EA6F32009CC for ; Tue, 5 Dec 2023 07:16:55 +0100 (CET) X-IronPort-AV: E=McAfee;i="6600,9927,10914"; a="121477130" X-IronPort-AV: E=Sophos;i="6.04,251,1695654000"; d="scan'208";a="121477130" Received: from unknown (HELO oym-r2.gw.nic.fujitsu.com) ([210.162.30.90]) by esa11.hc1455-7.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2023 15:16:54 +0900 Received: from oym-m1.gw.nic.fujitsu.com (oym-nat-oym-m1.gw.nic.fujitsu.com [192.168.87.58]) by oym-r2.gw.nic.fujitsu.com (Postfix) with ESMTP id 3214BD7AE8 for ; Tue, 5 Dec 2023 15:16:51 +0900 (JST) Received: from kws-ab3.gw.nic.fujitsu.com (kws-ab3.gw.nic.fujitsu.com [192.51.206.21]) by oym-m1.gw.nic.fujitsu.com (Postfix) with ESMTP id 5D396D88B8 for ; Tue, 5 Dec 2023 15:16:50 +0900 (JST) Received: from edo.cn.fujitsu.com (edo.cn.fujitsu.com [10.167.33.5]) by kws-ab3.gw.nic.fujitsu.com (Postfix) with ESMTP id E8E4E2007B701 for ; Tue, 5 Dec 2023 15:16:49 +0900 (JST) Received: from rhel93GA.g08.fujitsu.local (unknown [10.167.221.71]) by edo.cn.fujitsu.com (Postfix) with ESMTP id A00091A0071; Tue, 5 Dec 2023 14:16:49 +0800 (CST) From: Yang Xu To: ltp@lists.linux.it Date: Tue, 5 Dec 2023 01:16:38 -0500 Message-Id: <20231205061639.68656-2-xuyang2018.jy@fujitsu.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20231205061639.68656-1-xuyang2018.jy@fujitsu.com> References: <20231205061639.68656-1-xuyang2018.jy@fujitsu.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-TM-AS-Product-Ver: IMSS-9.1.0.1417-9.0.0.1002-28038.005 X-TM-AS-User-Approved-Sender: Yes X-TMASE-Version: IMSS-9.1.0.1417-9.0.1002-28038.005 X-TMASE-Result: 10--9.608600-10.000000 X-TMASE-MatchedRID: ojZhuzNjofOPo+6vQMop+qzGfgakLdjawTlc9CcHMZerwqxtE531VIPc XuILVCbat52LZu/NbuP5KQEoKNwwIHyAL08NM00eutvHF25zoU8kPki1Yfh9Il/8lGqVstJXXJg Pk+dCjq2wDEIJD1Y7K6loc6WqrZaZICxs2SEh5wGIf3m0sUfx5za6AaQm7fhmPHMAbjuhwd9G1Q vheJ9Oe7vlPk1VIqp1gDLqnrRlXrZ8nn9tnqel2DsAVzN+Ov/s/WxM7wRQia704rMS4XOUcP4j3 pyGCyOJZr2vw798TI48KQxoBVDnpQ== X-TMASE-SNAP-Result: 1.821001.0001-0-1-22:0,33:0,34:0-0 X-Virus-Scanned: clamav-milter 1.0.1 at in-7.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-7.smtp.seeweb.it Subject: [LTP] [PATCH 2/3] syscalls/swapon03: Use get_maxswapfiles() api instead of hard code X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Yang Xu --- testcases/kernel/syscalls/swapon/swapon03.c | 47 +++------------------ 1 file changed, 6 insertions(+), 41 deletions(-) diff --git a/testcases/kernel/syscalls/swapon/swapon03.c b/testcases/kernel/syscalls/swapon/swapon03.c index dc633ebc6..744fca3d1 100644 --- a/testcases/kernel/syscalls/swapon/swapon03.c +++ b/testcases/kernel/syscalls/swapon/swapon03.c @@ -19,14 +19,12 @@ #include "tst_test.h" #include "lapi/syscalls.h" -#include "swaponoff.h" #include "libswap.h" static int setup_swap(void); static int clean_swap(void); static int check_and_swapoff(const char *filename); - -static int swapfiles; +static int swapfiles, max_swapfiles; int testfiles = 3; static struct swap_testfile_t { @@ -57,47 +55,13 @@ static void verify_swapon(void) "(%d). System reboot recommended.", expected_errno); } else { - /* Probably the system supports MAX_SWAPFILES > 30, - * let's try with MAX_SWAPFILES == 32 */ - - /* Call swapon sys call once again for 32 - * now we can't receive an error */ - TEST(tst_syscall(__NR_swapon, swap_testfiles[1].filename, 0)); - - /* Check return code (now we're expecting success) */ - if (TST_RET < 0) { - tst_res(TFAIL | TTERRNO, - "swapon(2) got an unexpected failure"); - } else { - /* Call swapon sys call once again for 33 - * now we have to receive an error */ - TEST(tst_syscall(__NR_swapon, swap_testfiles[2].filename, 0)); - - /* Check return code (should be an error) */ - if ((TST_RET == -1) && (TST_ERR == expected_errno)) { - tst_res(TPASS, - "swapon(2) got expected failure;" - " Got errno = %d, probably your" - " MAX_SWAPFILES is 32", - expected_errno); - } else { - tst_res(TFAIL, - "swapon(2) failed to produce" - " expected error: %d, got %s." - " System reboot after execution of LTP" - " test suite is recommended.", - expected_errno, strerror(TST_ERR)); - } - } + tst_res(TFAIL, "swapon(2) succeeded unexpectedly"); } if (clean_swap() < 0) tst_brk(TBROK, "Cleanup failed, quitting the test"); } -/* - * Create 33 and activate 30 swapfiles. - */ static int setup_swap(void) { pid_t pid; @@ -139,9 +103,10 @@ static int setup_swap(void) tst_brk(TFAIL, "Failed to find existing number of swapfiles"); /* Determine how many more files are to be created */ - swapfiles = MAX_SWAPFILES - swapfiles; - if (swapfiles > MAX_SWAPFILES) - swapfiles = MAX_SWAPFILES; + max_swapfiles = (int)get_maxswapfiles(); + swapfiles = max_swapfiles - swapfiles; + if (swapfiles > max_swapfiles) + swapfiles = max_swapfiles; pid = SAFE_FORK(); if (pid == 0) { /*create and turn on remaining swapfiles */ From patchwork Tue Dec 5 06:16:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang Xu \\(Fujitsu\\)" X-Patchwork-Id: 1871833 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=patchwork.ozlabs.org) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Skr141G1Jz1ySd for ; Tue, 5 Dec 2023 17:17:28 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 7ADCD3CBFCA for ; Tue, 5 Dec 2023 07:17:25 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [217.194.8.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id B2D623CBF85 for ; Tue, 5 Dec 2023 07:16:58 +0100 (CET) Received: from esa9.hc1455-7.c3s2.iphmx.com (esa9.hc1455-7.c3s2.iphmx.com [139.138.36.223]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by in-5.smtp.seeweb.it (Postfix) with ESMTPS id D9DB7600CCC for ; Tue, 5 Dec 2023 07:16:57 +0100 (CET) X-IronPort-AV: E=McAfee;i="6600,9927,10914"; a="130438137" X-IronPort-AV: E=Sophos;i="6.04,251,1695654000"; d="scan'208";a="130438137" Received: from unknown (HELO oym-r3.gw.nic.fujitsu.com) ([210.162.30.91]) by esa9.hc1455-7.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2023 15:16:54 +0900 Received: from oym-m2.gw.nic.fujitsu.com (oym-nat-oym-m2.gw.nic.fujitsu.com [192.168.87.59]) by oym-r3.gw.nic.fujitsu.com (Postfix) with ESMTP id 45C56D64A0 for ; Tue, 5 Dec 2023 15:16:52 +0900 (JST) Received: from kws-ab3.gw.nic.fujitsu.com (kws-ab3.gw.nic.fujitsu.com [192.51.206.21]) by oym-m2.gw.nic.fujitsu.com (Postfix) with ESMTP id 6D7E1BF4A0 for ; Tue, 5 Dec 2023 15:16:51 +0900 (JST) Received: from edo.cn.fujitsu.com (edo.cn.fujitsu.com [10.167.33.5]) by kws-ab3.gw.nic.fujitsu.com (Postfix) with ESMTP id 040052007B701 for ; Tue, 5 Dec 2023 15:16:51 +0900 (JST) Received: from rhel93GA.g08.fujitsu.local (unknown [10.167.221.71]) by edo.cn.fujitsu.com (Postfix) with ESMTP id A2C0C1A0071; Tue, 5 Dec 2023 14:16:50 +0800 (CST) From: Yang Xu To: ltp@lists.linux.it Date: Tue, 5 Dec 2023 01:16:39 -0500 Message-Id: <20231205061639.68656-3-xuyang2018.jy@fujitsu.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20231205061639.68656-1-xuyang2018.jy@fujitsu.com> References: <20231205061639.68656-1-xuyang2018.jy@fujitsu.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-TM-AS-Product-Ver: IMSS-9.1.0.1417-9.0.0.1002-28038.005 X-TM-AS-User-Approved-Sender: Yes X-TMASE-Version: IMSS-9.1.0.1417-9.0.1002-28038.005 X-TMASE-Result: 10--9.963700-10.000000 X-TMASE-MatchedRID: uXLKq++rPJdlJTodqNqEzqzGfgakLdjalwT0XposETW+f7ap9DJaDb8F Hrw7frluf146W0iUu2tMCgkc3/BmTUwYXRRr2ymnfOaYwP8dcX4ogaQhRNNEvpsoi2XrUn/J8m+ hzBStansUGm4zriL0oQtuKBGekqUpI/NGWt0UYPArDdi+0UXUjf7DjywJezFAalWSuTFeCDFc6V Qb0Hn5VK8e8eBqaP6r X-TMASE-SNAP-Result: 1.821001.0001-0-1-22:0,33:0,34:0-0 X-Virus-Scanned: clamav-milter 1.0.1 at in-5.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-5.smtp.seeweb.it Subject: [LTP] [PATCH 3/3] swaponoff.h: Remove useless header X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Since we have use get_maxswapfiles() api in swapon03.c, so this header is useless and can be removed safely. Signed-off-by: Yang Xu --- testcases/kernel/syscalls/swapon/swaponoff.h | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 testcases/kernel/syscalls/swapon/swaponoff.h diff --git a/testcases/kernel/syscalls/swapon/swaponoff.h b/testcases/kernel/syscalls/swapon/swaponoff.h deleted file mode 100644 index 900761bda..000000000 --- a/testcases/kernel/syscalls/swapon/swaponoff.h +++ /dev/null @@ -1,8 +0,0 @@ - -#ifndef __SWAP_ON_OFF_H_ -#define __SWAP_ON_OFF_H_ - -#include -#define MAX_SWAPFILES 30 - -#endif