From patchwork Fri Jun 14 02:30:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 13697735 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC64FC27C4F for ; Fri, 14 Jun 2024 02:30:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 34F256B00C8; Thu, 13 Jun 2024 22:30:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2FF6E6B00CA; Thu, 13 Jun 2024 22:30:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0DB426B00CB; Thu, 13 Jun 2024 22:30:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id D8DE86B00C8 for ; Thu, 13 Jun 2024 22:30:26 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 793681203E9 for ; Fri, 14 Jun 2024 02:30:26 +0000 (UTC) X-FDA: 82227915252.17.35F0C16 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2084.outbound.protection.outlook.com [40.107.243.84]) by imf20.hostedemail.com (Postfix) with ESMTP id 9C29F1C000B for ; Fri, 14 Jun 2024 02:30:22 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=qZUI1UpE; spf=pass (imf20.hostedemail.com: domain of jhubbard@nvidia.com designates 40.107.243.84 as permitted sender) smtp.mailfrom=jhubbard@nvidia.com; dmarc=pass (policy=reject) header.from=nvidia.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718332222; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ELhIipCA5a26Y55PWno65iZaFhnhGz7WGaf+5hkdpTo=; b=ohRjtI2rHrAdyxwYKU/OwyBiPcDvJAWtUdnmARN0MPZdQKNNiWUYF+ZuCmiWaGdlPybaf+ fLzglUaN0bG1M62nlOK3aULBv7301Oc7yN9RHMW6gXjuhksmDeTMCDGoOrvyQicdVcdlaO +/QSMMivolwwuNuLm7haOrDl8pIUvAg= ARC-Authentication-Results: i=2; imf20.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=qZUI1UpE; spf=pass (imf20.hostedemail.com: domain of jhubbard@nvidia.com designates 40.107.243.84 as permitted sender) smtp.mailfrom=jhubbard@nvidia.com; dmarc=pass (policy=reject) header.from=nvidia.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1718332222; a=rsa-sha256; cv=pass; b=RNMogepoWbjf/93mIhsWPULZgSt065UfHHCRco201BQBZ4//6t5zyBW7DJGnlvcjOPpnkC Aeig58XzeO/Uf0N9fRMNC7RXHrDFc1L8a6KI4RbpP8wQWWnnecuaC22tvoz1C6FDKPJrQU GZai1anUAxfq5lAU6CUSBFvr7rtsgb0= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CT2B5koETb/7WXPgqXWSetRWCSStayy6WOp81tjv6034kv4nGNMujkOkahQdcImJv/EXC/cEkFlub3RXQZW8Rlu0cn6HMymBFZvkXSgpNypSLS+nxhumD5IfdKNJG1MVihaXP4lZrawhjWf14TZMicWXPPXEid+Nzml1QAOZk2E8BfltHR9RG72vJzaY3HPUlatU0SGmDu3MHXGyEL+D1j6fSstuOBvT0GyYNi6/AhxoCApFiBTjTHTOS/nLdP5QIYjsvFvKJ3KjCoiwW5JX7ko1tyRBBZE0CcgP+Sg6EoNq7ZgtyCjYqtlZw3PFkSgstA0Hs0vdg2X/AbBMr4IWfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ELhIipCA5a26Y55PWno65iZaFhnhGz7WGaf+5hkdpTo=; b=JzbeE7g5Cx1gus6nk6KSW3ml3I0SpV2bbc3D0K0nCH+8NFRH9z5e7FbhSyOYRzqj7q4jiwfc2/sl/uh/g0tI3NEGU8fqj52nPePB1J10y0lfbOau1UHeNROaVttxVkQYhFxSL6RU0HyByxxu7sSoZC+4QjT0V7n9EITf7NZHTh8yDfwZb+bw4YCfJmZS8/QYH92TnRcB5v8HTKNaCQ+A4J73KcCkJEVkBJdh1DBbXhuXA0qJUYaS1xQ189OAVW8m3XsViATvfosu7LZSpW4OOkutsbcxu7OcnXETUCSMUI39KGKj+mzuTLWupYrtpPLNw4nZgInEJXB/stJJp6iNrw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ELhIipCA5a26Y55PWno65iZaFhnhGz7WGaf+5hkdpTo=; b=qZUI1UpEV1O6Y5Tsq4rAOh2KvC7OfspeKVTmLthfQxiBY6QQvExLLBxqV9I4SAJUukevkDUoJ4ENkzXScrjATpWUfi+ghCsKepZOJMWKqYS69ffuIU72MMeG/2WVhG8TqY3tFu9zHzf5OuYIOLwgGS4qbdo80rFmorP/he/HiOT3qR6MEvAmcLbSnJhsBdq5NTKs94YVWeTVIZADtVO4QuJ3GiWZomsxNrPp4gkODJjfMQxvRbMPhPHZINLEU5z+SjRCB0lFJOFOdMywLlPmkck/6Ru/lKoxzfsZ5Rz6uNBeKYbdtiEzn01VzDwMH4UFnvwLDOwe0DLpmIXCJu4etw== Received: from BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) by PH0PR12MB7932.namprd12.prod.outlook.com (2603:10b6:510:280::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.37; Fri, 14 Jun 2024 02:30:13 +0000 Received: from BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07]) by BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07%4]) with mapi id 15.20.7633.037; Fri, 14 Jun 2024 02:30:13 +0000 From: John Hubbard To: Andrew Morton , Jeff Xu , Shuah Khan Cc: Andrei Vagin , Axel Rasmussen , Christian Brauner , David Hildenbrand , Kees Cook , Kent Overstreet , "Liam R . Howlett" , Muhammad Usama Anjum , Peter Xu , Rich Felker , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, LKML , John Hubbard Subject: [PATCH v2 3/6] selftests/mm: mseal, self_elf: rename TEST_END_CHECK to REPORT_TEST_PASS Date: Thu, 13 Jun 2024 19:30:06 -0700 Message-ID: <20240614023009.221547-4-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240614023009.221547-1-jhubbard@nvidia.com> References: <20240614023009.221547-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: SJ0P220CA0004.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:41b::9) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|PH0PR12MB7932:EE_ X-MS-Office365-Filtering-Correlation-Id: af80fed2-942c-4623-3eed-08dc8c19eb4c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230035|1800799019|366011|7416009|376009; X-Microsoft-Antispam-Message-Info: dBl/ZrVhVT1l6i9DSDzH8DhH6vgINbBGWkVtZkP6qyaSPLjHsyn7vDHAi0f6eHhdU32bhFmkJQOdkdEV7TznP2dDnTw7gL7yVA0fQBQFQ5riy5eJuKnkBQZNL3K1d74Zw78g36m0t7E7873gg/hkfvyW6GNwkmOu5x/nSNa0JX0lg2kOfukpoNIsPrGV06DkO/FYIplOZ6tX1qOtjwiWyH7OXgvjPMXqfFxTgC1000GAHsFLoLgV2zBfyezz30QyttIhQaJT4Qtd0J4mIe/uIuXFpckMehT9LqOKnheiDg3RRdUMmMpHU/OsE/QcKuBNEhVjr3RF93giKdMR31goBbTJ0K2VCr8JSU/Jtg+fkZWA69VPg+PVEUrm8cEsPgiTbzaqwrlBy4It15muXOEuvlWiphkRznULMoliu13w5bF63w93df/k/Mv5xdnz92ueWeiN4vm6baDIVjJH9fBv275/tJFDBi5h15m1l9ZZxYJgbShIfHY2U31JJa0dhP1YC+rYZfSzU/ekjNcjgjqmhOmPfetkTTBEEKUy5HQSWdmsPRIcB3hVlqo9PQ7GMEiZIoQFSauW8THMpAnaKi92i9dQVpKrhrPimW/+j2o/RSOBsA/k70FcJh52MyOej2I1PPngcAmNfuSldQVZxodkgvBzbEs7B4PbpT0NPRcjKxffPZ8fzt4Zp3Yd87RQUUlIq6kKLTR+4DcC0LYAe2nmCAZE/bcWul+0sWcoKNzwECN7UobDf9gOTjFs0IVUZAox5+api0yKxUEfixIas3Ozyp3Yf+eB7SxjsP+wojk6D4L3nsbEmgt/PfEhGzA6KdW13nfFsOx8jnIwkYT4onOK6r3r3t2lggYyLNDVZclvILRotPxz8nKDXqj8IABPeDqJHYkwEQhcPLfUxYzdHYqb/krrealVQxAfmfD4Hy7QhswOLWkfyrMrzQa+wznh2Yq8WQwj2wVH5Nhbd9JGzOGEtoCTldGOoyO5rNhHiAlLi9tmXgXL8bbKYdTmAKurxmpvHiI5Mn0k0Xg+1vjD/jY8LmKRrLsHH9OIiKCi1jQma8Y4dU/eC7MMaxX5ef+tnJwZ/u5AbMEKVTqnlgxqUwhk+ZygpwHRkziwy7TnYQ9zD0fQR3TZu2PFoX8Uuf5VXDOSIvjPj6R3q99DLBVSiqAl7FrtETgexELENghhUI2kK2X/6Kt/OKCe9kWzb5HUzu8xFDcnhVm7VIR4NjVw8EbkiISnq3dfre9V+FTlpw7p3/8ewTIOaEwCqBv5mrIL//6azGHPkGx9JpzDrnb3i6RDvqdV+zOQfJS3qNO2FZx6bJGvqCjjmv2/bI7XpqfMHAFp X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR12MB4130.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230035)(1800799019)(366011)(7416009)(376009);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6AWFnYCNzg+L2XlXDOSX18vivnKz0xs58pqLhnkxmRpRs+PAtg4yr2HRSzoKGjZtyrOk+ffvuRcaJa0JuwjSoGoXrNpdqroAGxErYnovexKvmEswHVJA9LOS7naNPB/wnWsQs0jhaZoZ3Tjfvo4Y4/BmVo3wC9wvqBeoHulVDdWrb85iKf1L/vigZAPbaIXJU9AWT6narvLYmIe5vdJOjEwsXjlwKGaC3iMd+xc38PRldXtTLlsscUBznSTR6m9qYEHs8QsY14jr2o30NMTuvM/LGMnADbrmCx09ERWPH4g+zy4DO7xC2xvXK+G8eMPfTz52/a5CMErohyge3hO9f2GZFzNI9fP7FEpFJ51VcA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y5BYYz86k3wIrqVnDXd2mLalkHf1PZMdHtOD5i15JjtcRlIntf3YU+PCL4gg2+1QDc4oRhjEL23X1rEFmp36RgEkyyZ/UsGlCQBgSbvLHHqVnaUzBIUGnMSyv6WG8J3ndxhACm/vQJ/5of1VZ20e25jWxL6Fm0L6+yEZdDBrd X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: af80fed2-942c-4623-3eed-08dc8c19eb4c X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2024 02:30:13.0775 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: giV4Hpf7QEEvwidWUQQj4Y8mflKYyTW3ehMilVPpXstD97i/OkrSVWLZLWuX2Stmor/zyhR+8utfBwfj4n8O2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7932 X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 9C29F1C000B X-Stat-Signature: iehs6ycwiqoh416g3rtuyeaefxny3zhz X-HE-Tag: 1718332222-955658 X-HE-Meta: U2FsdGVkX195j70gbC4LYhAxLSNcHKgm3DY/yQLhO1ZSLN7vh+giPvVZbsQ1uBvWDOnGkWBRbFjORBm/FVQRGX5Qie6MBbwHlcdWzpSHz14hZYQx2Ju7FhGw1OJiAJ9/GYugWb0XvaJ6WrGgWmL8XqEzgHiAInJxCKkbaS8oQZWAg+2YTURYMFaFAfmA5BkEOODazau4ZZIJSTuTPGlxkwN4p8mW0OCko9I49NYjv/6jjvxbRbxAGbdqMR96pe3gcYtbuest57b8iyJjK4Ju9dRLXQItZnXqq/83K0l9k4SYSSsjOGeDXouLdX7I02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m@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Now that the test macros are factored out into their final location, and simplified, it's time to rename TEST_END_CHECK to something that represents its new functionality: REPORT_TEST_PASS. Cc: David Hildenbrand Reviewed-by: Jeff Xu Tested-by: Jeff Xu Signed-off-by: John Hubbard Acked-by: David Hildenbrand --- tools/testing/selftests/mm/mseal_helpers.h | 2 +- tools/testing/selftests/mm/mseal_test.c | 92 +++++++++++----------- tools/testing/selftests/mm/seal_elf.c | 2 +- 3 files changed, 48 insertions(+), 48 deletions(-) diff --git a/tools/testing/selftests/mm/mseal_helpers.h b/tools/testing/selftests/mm/mseal_helpers.h index 108d3fd0becb..0cfce31c76d2 100644 --- a/tools/testing/selftests/mm/mseal_helpers.h +++ b/tools/testing/selftests/mm/mseal_helpers.h @@ -18,7 +18,7 @@ } \ } while (0) -#define TEST_END_CHECK() ksft_test_result_pass("%s\n", __func__) +#define REPORT_TEST_PASS() ksft_test_result_pass("%s\n", __func__) #ifndef PKEY_DISABLE_ACCESS #define PKEY_DISABLE_ACCESS 0x1 diff --git a/tools/testing/selftests/mm/mseal_test.c b/tools/testing/selftests/mm/mseal_test.c index a28912fbecab..a556b7e51caa 100644 --- a/tools/testing/selftests/mm/mseal_test.c +++ b/tools/testing/selftests/mm/mseal_test.c @@ -240,7 +240,7 @@ static void test_seal_addseal(void) ret = sys_mseal(ptr, size); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_unmapped_start(void) @@ -268,7 +268,7 @@ static void test_seal_unmapped_start(void) ret = sys_mseal(ptr + 2 * page_size, 2 * page_size); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_unmapped_middle(void) @@ -300,7 +300,7 @@ static void test_seal_unmapped_middle(void) ret = sys_mseal(ptr + 3 * page_size, page_size); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_unmapped_end(void) @@ -329,7 +329,7 @@ static void test_seal_unmapped_end(void) ret = sys_mseal(ptr, 2 * page_size); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_multiple_vmas(void) @@ -360,7 +360,7 @@ static void test_seal_multiple_vmas(void) ret = sys_mseal(ptr, size); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_split_start(void) @@ -385,7 +385,7 @@ static void test_seal_split_start(void) ret = sys_mseal(ptr + page_size, 3 * page_size); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_split_end(void) @@ -410,7 +410,7 @@ static void test_seal_split_end(void) ret = sys_mseal(ptr, 3 * page_size); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_invalid_input(void) @@ -445,7 +445,7 @@ static void test_seal_invalid_input(void) ret = sys_mseal(ptr - page_size, 5 * page_size); FAIL_TEST_IF_FALSE(ret < 0); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_zero_length(void) @@ -469,7 +469,7 @@ static void test_seal_zero_length(void) ret = sys_mprotect(ptr, size, PROT_READ | PROT_WRITE); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_zero_address(void) @@ -495,7 +495,7 @@ static void test_seal_zero_address(void) ret = sys_mprotect(ptr, size, PROT_READ | PROT_WRITE); FAIL_TEST_IF_FALSE(ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_twice(void) @@ -515,7 +515,7 @@ static void test_seal_twice(void) ret = sys_mseal(ptr, size); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mprotect(bool seal) @@ -539,7 +539,7 @@ static void test_seal_mprotect(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_start_mprotect(bool seal) @@ -569,7 +569,7 @@ static void test_seal_start_mprotect(bool seal) PROT_READ | PROT_WRITE); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_end_mprotect(bool seal) @@ -599,7 +599,7 @@ static void test_seal_end_mprotect(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mprotect_unalign_len(bool seal) @@ -628,7 +628,7 @@ static void test_seal_mprotect_unalign_len(bool seal) PROT_READ | PROT_WRITE); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mprotect_unalign_len_variant_2(bool seal) @@ -656,7 +656,7 @@ static void test_seal_mprotect_unalign_len_variant_2(bool seal) PROT_READ | PROT_WRITE); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mprotect_two_vma(bool seal) @@ -691,7 +691,7 @@ static void test_seal_mprotect_two_vma(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mprotect_two_vma_with_split(bool seal) @@ -738,7 +738,7 @@ static void test_seal_mprotect_two_vma_with_split(bool seal) PROT_READ | PROT_WRITE); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mprotect_partial_mprotect(bool seal) @@ -764,7 +764,7 @@ static void test_seal_mprotect_partial_mprotect(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mprotect_two_vma_with_gap(bool seal) @@ -807,7 +807,7 @@ static void test_seal_mprotect_two_vma_with_gap(bool seal) ret = sys_mprotect(ptr + 3 * page_size, page_size, PROT_READ); FAIL_TEST_IF_FALSE(ret == 0); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mprotect_split(bool seal) @@ -844,7 +844,7 @@ static void test_seal_mprotect_split(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mprotect_merge(bool seal) @@ -878,7 +878,7 @@ static void test_seal_mprotect_merge(bool seal) ret = sys_mprotect(ptr + 2 * page_size, 2 * page_size, PROT_READ); FAIL_TEST_IF_FALSE(ret == 0); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_munmap(bool seal) @@ -903,7 +903,7 @@ static void test_seal_munmap(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } /* @@ -943,7 +943,7 @@ static void test_seal_munmap_two_vma(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } /* @@ -981,7 +981,7 @@ static void test_seal_munmap_vma_with_gap(bool seal) ret = sys_munmap(ptr, size); FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_munmap_start_freed(bool seal) @@ -1021,7 +1021,7 @@ static void test_munmap_start_freed(bool seal) FAIL_TEST_IF_FALSE(size == 0); } - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_munmap_end_freed(bool seal) @@ -1051,7 +1051,7 @@ static void test_munmap_end_freed(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_munmap_middle_freed(bool seal) @@ -1095,7 +1095,7 @@ static void test_munmap_middle_freed(bool seal) FAIL_TEST_IF_FALSE(size == 0); } - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mremap_shrink(bool seal) @@ -1124,7 +1124,7 @@ static void test_seal_mremap_shrink(bool seal) } - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mremap_expand(bool seal) @@ -1156,7 +1156,7 @@ static void test_seal_mremap_expand(bool seal) } - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mremap_move(bool seal) @@ -1189,7 +1189,7 @@ static void test_seal_mremap_move(bool seal) } - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mmap_overwrite_prot(bool seal) @@ -1217,7 +1217,7 @@ static void test_seal_mmap_overwrite_prot(bool seal) } else FAIL_TEST_IF_FALSE(ret2 == ptr); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mmap_expand(bool seal) @@ -1248,7 +1248,7 @@ static void test_seal_mmap_expand(bool seal) } else FAIL_TEST_IF_FALSE(ret2 == ptr); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mmap_shrink(bool seal) @@ -1276,7 +1276,7 @@ static void test_seal_mmap_shrink(bool seal) } else FAIL_TEST_IF_FALSE(ret2 == ptr); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mremap_shrink_fixed(bool seal) @@ -1307,7 +1307,7 @@ static void test_seal_mremap_shrink_fixed(bool seal) } else FAIL_TEST_IF_FALSE(ret2 == newAddr); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mremap_expand_fixed(bool seal) @@ -1338,7 +1338,7 @@ static void test_seal_mremap_expand_fixed(bool seal) } else FAIL_TEST_IF_FALSE(ret2 == newAddr); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mremap_move_fixed(bool seal) @@ -1368,7 +1368,7 @@ static void test_seal_mremap_move_fixed(bool seal) } else FAIL_TEST_IF_FALSE(ret2 == newAddr); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mremap_move_fixed_zero(bool seal) @@ -1400,7 +1400,7 @@ static void test_seal_mremap_move_fixed_zero(bool seal) } - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mremap_move_dontunmap(bool seal) @@ -1429,7 +1429,7 @@ static void test_seal_mremap_move_dontunmap(bool seal) } - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_mremap_move_dontunmap_anyaddr(bool seal) @@ -1463,7 +1463,7 @@ static void test_seal_mremap_move_dontunmap_anyaddr(bool seal) } - TEST_END_CHECK(); + REPORT_TEST_PASS(); } @@ -1556,7 +1556,7 @@ static void test_seal_merge_and_split(void) FAIL_TEST_IF_FALSE(size == 22 * page_size); FAIL_TEST_IF_FALSE(prot == 0x4); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_discard_ro_anon_on_rw(bool seal) @@ -1585,7 +1585,7 @@ static void test_seal_discard_ro_anon_on_rw(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_discard_ro_anon_on_pkey(bool seal) @@ -1632,7 +1632,7 @@ static void test_seal_discard_ro_anon_on_pkey(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_discard_ro_anon_on_filebacked(bool seal) @@ -1669,7 +1669,7 @@ static void test_seal_discard_ro_anon_on_filebacked(bool seal) FAIL_TEST_IF_FALSE(!ret); close(fd); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_discard_ro_anon_on_shared(bool seal) @@ -1698,7 +1698,7 @@ static void test_seal_discard_ro_anon_on_shared(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } static void test_seal_discard_ro_anon(bool seal) @@ -1728,7 +1728,7 @@ static void test_seal_discard_ro_anon(bool seal) else FAIL_TEST_IF_FALSE(!ret); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } int main(int argc, char **argv) diff --git a/tools/testing/selftests/mm/seal_elf.c b/tools/testing/selftests/mm/seal_elf.c index 7f6a95613dd6..619da94b9f33 100644 --- a/tools/testing/selftests/mm/seal_elf.c +++ b/tools/testing/selftests/mm/seal_elf.c @@ -127,7 +127,7 @@ static void test_seal_elf(void) FAIL_TEST_IF_FALSE(ret < 0); ksft_print_msg("somestr is sealed, mprotect is rejected\n"); - TEST_END_CHECK(); + REPORT_TEST_PASS(); } int main(int argc, char **argv)