From patchwork Tue Jun 18 02:24:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 13701700 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 1DE32C27C79 for ; Tue, 18 Jun 2024 02:26:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AE2B18D000C; Mon, 17 Jun 2024 22:26:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AB9868D0001; Mon, 17 Jun 2024 22:26:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8E5578D000C; Mon, 17 Jun 2024 22:26:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 6C4CB8D0001 for ; Mon, 17 Jun 2024 22:26:03 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 30D75140318 for ; Tue, 18 Jun 2024 02:26:03 +0000 (UTC) X-FDA: 82242419406.16.E0512EA Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2065.outbound.protection.outlook.com [40.107.243.65]) by imf18.hostedemail.com (Postfix) with ESMTP id 607AA1C0008 for ; Tue, 18 Jun 2024 02:26:00 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=I3IM5Y5i; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf18.hostedemail.com: domain of jhubbard@nvidia.com designates 40.107.243.65 as permitted sender) smtp.mailfrom=jhubbard@nvidia.com; dmarc=pass (policy=reject) header.from=nvidia.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718677554; 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=OHCQG7BggPiMHbTnE22zLbGUpD7QcsjBk3b5b+WODUM=; b=ZLDJPNsNwcIbmOWJ827lr3OTaZ3GSzVRzr7TV20dhpzICPn4+KOk9Uz50qsYMAbPBqUkwc Rkz+LSMsNosy0dyhGW9x/8xJFOmCNNB1B7sOJCpzQbmXpHk0IcoEcQpNxJ7OILkZnd4PY3 C/8K3P+g1j+d5M4TsOryWrwgBGTgAe4= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1718677554; a=rsa-sha256; cv=pass; b=tW0/YNUsL3P1JSUKvbyapYwy114ptimfjrlzxvqkMPquRreL/XHvgxn4mvNyGB+hblkZCV 7VMP3LYZEERa7cNlO4jQ+VVBp83qOrHFFscyoWRIeDi/qOnmBGBTssUPamJokBDOr408oa hIB/uYMpQy4jI9D0kae4GRFOoj7tMAI= ARC-Authentication-Results: i=2; imf18.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=I3IM5Y5i; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf18.hostedemail.com: domain of jhubbard@nvidia.com designates 40.107.243.65 as permitted sender) smtp.mailfrom=jhubbard@nvidia.com; dmarc=pass (policy=reject) header.from=nvidia.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zlqm0xIOD2EYl0sRt/nU3s0B2YDUJhaSLSTUNGXqiBeAHzK8ddb00uuN9+4FBa6J9B1FgG5zs8zCmJhpgZz+jOLDffQkk/jBfwvdEDzJKFyfz9VGJV//9A+GBjjYWhUDH7eqMZPacAv+90NQBGygkroj1Lf68ZewSUSJmU8FJ0zYwUEpepxohjtRNiQM/X3XZdELoiTTstxoIHp7lJA9+CbSbjj0D/toHemlWIMUeQCLFcqpR9K61wmV+521N8g9YjJz6ydWbb26fzJXIbA3eg3XM4Gj54ZHJf0HPyOr1eyJ9GOwAnWPQOc98lSEBnQKjCMPfO+WGRwSHRUrfPDNRA== 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=OHCQG7BggPiMHbTnE22zLbGUpD7QcsjBk3b5b+WODUM=; b=RbjhgOfOjIX3jvI9/d1N5pfy2/aU/klZfxeBeALbsGN6Q5O/USkws60yefx8j0lM0USMn2PXGjfmF5k9uLuBD5ckmf1SMJYYX2BlspENJ/n4LI3ewFjfP0aotNx6oImN87K29V2LNSNlZcqpTuktdW26oh9J8ixmZaQ138dXTogf/OzllBDDXGF0rWd35/durWXzFZ2gkaH/5SeSJ8W3H/TzuLd+S5QFwco5fAPen3DFDuJBrJfcL4V6VuRyRVgeRNHDc+CI27Ke8sSWprwSQkJaVF/XKT87c1lDaR1fVnEE1QOLwA5RmVzYYULW+zSjAcNsUuMqCEQ3xd1A4rKcCw== 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=OHCQG7BggPiMHbTnE22zLbGUpD7QcsjBk3b5b+WODUM=; b=I3IM5Y5imljOvPsj0Hgha5jWWebsQfclfXF+sqVInZMdQoqcUdjgWMe8MgvyTnqPBEWlwen7kTMlLJWvG8t5iLSUAueIORnd8ER3tvMmZxD+S/T+dT/HP6KYupEp/LMcDc4IW6RjWYl3QgVhxA/7e5Ej1aDZrOC9COVyWlA+6WiZ6aMlQaKkv0SJ7CmIozHLfQfy7ysRI2y+vlQiYETAfDHODtF7hRRYFLap8YMwyavO8OY3H8ezo5vyClmLAWKnav2o8d0fcFBB0TIw8Cbe2q2GKRknlKWufglQ1cl6I02vFb8d+GsRhb8oLUo3oDkPvRhAtD3iXF0NmSMfio92LA== Received: from BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) by SA3PR12MB8047.namprd12.prod.outlook.com (2603:10b6:806:31b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.31; Tue, 18 Jun 2024 02:24:26 +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.7677.030; Tue, 18 Jun 2024 02:24:26 +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 v3 3/6] selftests/mm: mseal, self_elf: rename TEST_END_CHECK to REPORT_TEST_PASS Date: Mon, 17 Jun 2024 19:24:19 -0700 Message-ID: <20240618022422.804305-4-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240618022422.804305-1-jhubbard@nvidia.com> References: <20240618022422.804305-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: SJ0PR13CA0227.namprd13.prod.outlook.com (2603:10b6:a03:2c1::22) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|SA3PR12MB8047:EE_ X-MS-Office365-Filtering-Correlation-Id: 27699c89-858d-4ad2-e2d9-08dc8f3dc65d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|7416011|376011|366013|1800799021; X-Microsoft-Antispam-Message-Info: 7+LjVT+lIYYP5u8X3wfF0ZmDdqU5zdxzr/WCYaIq1PXlYzGNjnbJzhLYfelvGXQYdpTqbr67WaCP7Uj1EOOPSW8CwIFW6vcvMvusBbSWME1scNXp2rW04To3ghGX47I/4XiHo1P4KTp8V0ffy2fAqqK3hRmaR3urqERFAlRVD/pDvMTZMkX7wrQamUf+39m8LtoEqyZQXFApSXtL6KtYbz9pBqRwcREs6b5YpoIlYGuO25tYSxfoigrSDdcmM7c67pnR9Wc9Uaq/WnTjs17JixO6o9NzvUs5u2qdXASIXCMzXLSvspn7qFat2JrD3nWusa9zml3yJBJgZ6KYR9z7fHHdvA0/QTyrJRoHDVsft2iaznr0s0y0vkPombHHGSrli6ec/105g0HzIyuSBEaAsWhlrqC3SHnnoC2TdpiNm/XqN7jzIDpmEAI8xHBgOclTrgk0Dd71u42n3hRuzXoPO9G1g7tiPJbzqUQiuUDu25x3koy239EGi/nMXMLkw8Du5q5/ffDhCZTsmaXUgLGh9f0lK87BjFY1s9WNp/3IzcR7MmgU7LY9cmH5MRmGpd0G95bBmAk95yhorUJb8BCrE9YxBzzWaZHaABW0JOGf/rq2hvLv5VXC5SHbVD2Wkp4VvgwhaNb6cYK4gi4da0xohfvUIIP3QKxfNjHSM0XTfk23Vk+Ma+dfKh4UtgMPZlLuecum6rIOBnzpOfgW3RldUn+Z81E1uMFAzXHbsnnwGUoY2c4Gwlqk+HIuDjZC/lsQkiIUSlfz4ILV6PePe3tpzTx3Em+iq2KQrOYcAtFqYOvASII9BZ/ONby8PZqVx7bxqnUUOPU4IB+elq4ubmp6feSzn2r0eNmGTPw2m/DRCIuAi1gcxLmGygz8Mir9yXbDHg6qQ7UqeVhfl8ptECdftBnDBgfl9cEhYi5NSlwNrGog8krf1xBnm5Je8fktFlP0Z8eRcKdfLtAdd/NUKvvX0Bfxeud3uvvRz7c7Ftv4C8fwe+hNxQ8I4aL1Eo2LTl0Ghh+LKn9n2WK3HyevX/sL8IZUCIv63xqrzSMIpiXPdjWbrRHnDfx/GLaqkaISeRUAyx861MqU4EkJ471Y7pNxOkqaWhopyS2cQqUkAtRbvLJ19Ghlpxa/FVGW46Gi29v5PWybS8ywIIVdWFeM6nLeZh52ndqBdXEClppQT9802XronDSWHtitqckbwX2AWoJm1eUDMcEYhlV7DNARuATCnTn9g8qBXDqZ6RLzcgBfSdkXmkQxpDcwkhhADg0WCyukrLDX25abUjon1dRD9hRxgYytKBhw10ok0w6+xAq+ZwdsSK04Lq2KzHs16JFxn/Xk 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:(13230037)(7416011)(376011)(366013)(1800799021);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3Bi+m7dPlk+TTZxtOGngp9Dm0n0kQABKyzDxoFdFjH5RTRN+byTBDV76WlpuAH4nobKzQSDEsb4czcDZb5AqzeYhGrOtG5MFv8AOjYHrK32sFmkH1dM7Di4OruIZqyAE1WNCbgTVJ+Ef30pbItSjxG8apzFX4zYgKwKBs7sKFxX954z4rzO3AJY38OsCzM25bQsVMB79M1Cu6/erjDt6EWa87pGzniskkEFuNQv5QFpDZQayOP7rk+mbftOlusNpsa6FC1jdBiBZsgqnV1gkKjQ1Iv/QDjrzZUTu1h+Hd4kdFus/63PWg1gJPuU8aGPf3nkoeAPpzoD5K678wutkkUZ/oBCU32WmUhybBmQt69sMlFIhbhgQIQOCh/2/Hin8Y1EMnPTmSX5sU7ZMKUWjqW8Q9BevfoTShZm6mab1zt70uURso2oMOruAY55wBw02TR3o0tHuziOmeTv5i+XwlcZfBvP9UJl36RGvTuLTghcQ3b9oxHypuSFSfsQ/1aLjwXGwHSPlCYf9mHiJKZdNGQPQYFktNY8LzZTIyBRSVvuOFusr4Arxg0egXnL3GuahVH3vm9AuFABV3mf16i1HxPCnP5nUY5geToUg1ZDwTVlhoQkdFHEDL89Q7z4Gbc+1oAGgHl/x+2P8G6oQMag8Lz5yHqTWd8UBYklvSJUF5gyOCVcVz80dOOmDZMfCmUDl5sZQ9LGz6A7KMFGXzoctu5RbqBNFlio4y+7UGhbbf0tRXmynvzVUdG1i/5hNnUKC46UaBg2GHRZvzHu161daSe/GQ41+X/bVIWSRgVX5EfBnsedr9ytfZcRI1XaRNXT8AECsqZEyJIs+YsakQ+G88t8OwssIWOTQgkEUKN0lg3cWAQdxbQe+2WeYdV2lgWQHO1r6RXqvXkrd4m2ovKr+Y5Cf4Tuuh0qO15Ytd71lINK83px13iC2STnASx3JOgbDoa7ww9L9gUYyVm9iAOjdbQlBEjCRse4JLCQ+5lJlikcqxug8yamaLO2bzGZ16xJYbY+71Ol9d27QqllGAuAS6Zp/vESzBDWJVwH1+U7cxvEnlLhrmKY0qjvM29IdbkPLQn2rfGE9rYdfkDsQ46KrY8SCsgDnZhZHjwFgB/8T3AM3ZU0vXkji2burDqg9xQ5poUhHSq1j2Moc9HDheDy7Ltjwvm5/I0ytmuQza1VUIWORrjogTeLbrqR0l17Oi/KdOzhhlRYBlDS/A2IYw1v78lddfSEUdEfrHAiR164PVKsGDYH51xd9ynuEm0GUAlmXmAi18swqP+X12I404C6f0AiCmamPAkaov0K4OjgdWMrY9nU/nqIHGRUJi9B4/3WL4WvlHd1ipe62zWQJzuMP3iAVHNxv1XkxCcyNzHzFmwVQv9ccRSdYkBAF2t8XLTsj+8itQQabnIBoXP/mkdDvcIBo+/flaMmeDDPjq4GzOZVD6LQXAzmsO9FYaMikhNCFOOAwJ6W5cSgJeFdemso/oKj6JTxzFb5JOiTKUf/3AF9K5rcXrYD2NDiNCXia+jgvPa5B1JxmoV1ZL6gIglsXlUqrk34f2AR/of4+7wuHUuZxSh7jidXH+95G0tiZlSvo X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 27699c89-858d-4ad2-e2d9-08dc8f3dc65d X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2024 02:24:26.4244 (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: RCbjcwiVbr99K7SL1c2jNWoGanYTIU66nuiumfkAxGQEmmqUAc8bUnelHr9xKryUPveO5WX7xZWPAxmmlpeaLA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB8047 X-Rspamd-Queue-Id: 607AA1C0008 X-Stat-Signature: u8kstu7537gpjihqr8ygcsob1g3pxpo5 X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1718677560-759264 X-HE-Meta: U2FsdGVkX18BqfY3VIAzP3j8sjRX8HQnXHwxyho/r/VMDJRXwD1RHNPA9de0iMbkE963BhiRhldfJt6mGTgNgYeea09uhEAGda3c3xixh2FjTvWDOsHjXZHp8Pt4xgP3fRBtXLHj4Wf3ZPsiuJOUBmz9hgZCWmr5u1TJMk6jPlBFTabFtsIgYdLUePWg5cg0LKggBISb+90Ee8zWTWwTbFjxUkA561jMYAP0mDXAEoBJTqg5OU70prJnkJ6fhjCaFYGfZsST0NOnZQSszg74HAeX1fTu9/hCpnlRK86TWujZbuOz7GPfopIBx/drin+ct30dxO3DjvANWX7ekEk5bV6pWcF4TGcYLGZOiPZTVTzVvZmxXznYkMOmE2dtgCe+8tG4XsjV85KQXJARPPoQZHUDifj0odKhw6ZESw1vPCu+s/wt4ibN3yZGiobCGS+nyw2ERD2rERxSB036LpsBAj9vmfR3SrAmu/BNb22siBj4RkyKqN031X7UywkP35dFeQdYtozqwQjKTKSGwdk308kyBibI6wKGPrI6KcYBnEl1/AyZ1niaNM2zDU9w8St9X4fEnYa0JfEN4kLm0IlaiDFPDHnGJdt2rf7oPsr/V799sxiORO+WfFkR6aG3kjXnqWBQ0YXQH90c2UCq8Mc1C4Mxe0yObPlXhVpDu/o4TE+IvB+OFDK/khXV94IMI0yjXIxc9R9MoPIrhUDzbqV+u8f7CMy9JfWTJB/qBK/G4xIN5fbUI22W+dlemlcWuxTFxuBajTr6qu7QGZ3BCR47nF8X+B/YdLDz/9um0jnki3VlcuAdC/mD7mOIUw3DHTx5bl8JLKwktQZ5cCMM1IUB6zmmtrytedDoOib0OEMuAokEz7ipwlwzZdhUMdFhX47uq8RkJpSMNxr+ZsIh3z2zvQPyLYV6AMBJp0BUVpuGtdB1wKJd0yFUWDq+/o5GdSFv9k7vTIOhs+scO4atq/z KMQRRfmU Z0mQKj4MHF5jiEJ/MHKIh/Q1uBAeNf/htK/GlbFYmw/tR7Tka7DZbzpMxp4mWGR3G05rzTqePXfbn5kzMqo/ZYiQADoZlXV7gILq3XssdfJoGDQh78t2zt80ucCrQw4qJDD+0IcRrU6Il20AnAqgX9joEOUN3dVL9ZIGkydGlQB/KX6wUwsgkRASGYTbeyPaTcLXBiab4OajR1R3MNzM5F+2iPmjOqa4iUwIMlThBz9iLQLmbixCzG1q3h3ofQ393skhjZcom4CBSSZ/FJzeXtnTD+nuI8/76096FkHAWLlpzDAfzJZJ0alSWb2VvZRV8VXmWQZeKIGHA1P7IVypJ05hRF3S8aF3zeToU X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@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. Acked-by: David Hildenbrand Reviewed-by: Jeff Xu Tested-by: Jeff Xu Signed-off-by: John Hubbard --- 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 d4d6ae42f502..a818f010de47 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 45c73213775b..7aa1366063e4 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)