Message ID | 20220819140035.32760-16-stefan.herbrechtsmeier-oss@weidmueller.com |
---|---|
State | Superseded |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> 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.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=weidmueller.onmicrosoft.com header.i=@weidmueller.onmicrosoft.com header.a=rsa-sha256 header.s=selector1-weidmueller-onmicrosoft-com header.b=3n5ya086; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 legolas.ozlabs.org (Postfix) with ESMTPS id 4M8Nl90BVzz1ygd for <incoming@patchwork.ozlabs.org>; Sat, 20 Aug 2022 00:03:33 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F1FBC84BA9; Fri, 19 Aug 2022 16:01:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=weidmueller.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=weidmueller.onmicrosoft.com header.i=@weidmueller.onmicrosoft.com header.b="3n5ya086"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E8C8484B55; Fri, 19 Aug 2022 16:01:16 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2041.outbound.protection.outlook.com [40.107.22.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 908E984B62 for <u-boot@lists.denx.de>; Fri, 19 Aug 2022 16:01:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=weidmueller.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=stefan.herbrechtsmeier-oss@weidmueller.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FcyVrnxapO5ZzABWePBaGDzcpt/2HZGpXUeeP5Cf/0NoU2DYFpGaUJ0sDGjB64W8E/xqETYVhpUTKjH2x6HpYu6fNomrqI4nNzo9YaZC7kQzzkpx6I/zTtu8ZqWgxd6wM5RFvqg+BwP4K9YYyougVflWeLRdjwP2+FeqsLLNPcVOa93ZeLzTK7jtLBZ4Ex9j3Fg64MEAIq4jZ5pt3k6L4WPZZZCsCYRQemMz/HdMQLz7WEMSqyGhGZ4TprRxtz/JYpR1FNJ54k5vl/khEKDcmHj7HRJTyfzie1iZm3R5VwWdOyUC+poCqOqy+w16IsmEh3nAAv1HXAqAto3nibL1kQ== 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=hsrZWPUP+3QBge/4W22G/iJxI610hXeXgTn0sQTlbqc=; b=IIZu7SJGT3/BaMNT5CkmUAop2QjBox47GyyaGz2r+IDrOZP+MokzJZ4i9hLNpqUwAQI++XS47TUxFtqXueC1GjSixV4/X3ErxP1iCyzVC7CwX1hAvv6dSs9YH+nbLQ3HbWaVWKXdPPKMrQQAUbIGuaOilajXzkorD15mD0TLPCH9REgd8f5ZeFzEx/h8kBhKNtek91vkBrtjzgOm3nIhAl1BVPoICklBp0WkkDcDvVAVtn0qbK+0HjVKBCxeuLWz2KlyTMQ+IbHCNTrwerY/yNtHxIQTI4fWzdMson9D66vdiqL511rISev1N095wcxBuhS+Rj+8oh78RFSEHjU7QQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=weidmueller.com; dmarc=pass action=none header.from=weidmueller.com; dkim=pass header.d=weidmueller.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=weidmueller.onmicrosoft.com; s=selector1-weidmueller-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hsrZWPUP+3QBge/4W22G/iJxI610hXeXgTn0sQTlbqc=; b=3n5ya086D9qwlriKcCLFmnxSKYHt5C2jWdH/LyDJtDdGCzfVJG6kpROhf0cR66/Y+Uh0dIdvnUTHMxJ0qX4kWAU8796K21LjlZvdrEOM/5P0R+AYVC3QzNSoVgguhnwxVjuR1nIAfXrfZ7MsAvjGppPBjwauVF2NZ0tR2jkmfUM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=weidmueller.com; Received: from PAXPR08MB6969.eurprd08.prod.outlook.com (2603:10a6:102:1d8::23) by DU2PR08MB7373.eurprd08.prod.outlook.com (2603:10a6:10:2f1::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.16; Fri, 19 Aug 2022 14:01:01 +0000 Received: from PAXPR08MB6969.eurprd08.prod.outlook.com ([fe80::f95b:2e64:9ee6:4d44]) by PAXPR08MB6969.eurprd08.prod.outlook.com ([fe80::f95b:2e64:9ee6:4d44%3]) with mapi id 15.20.5546.018; Fri, 19 Aug 2022 14:01:01 +0000 From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier-oss@weidmueller.com> To: u-boot@lists.denx.de Cc: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>, Simon Glass <sjg@chromium.org>, Alper Nebi Yasak <alpernebiyasak@gmail.com> Subject: [PATCH v5 15/21] binman: Add compression tests Date: Fri, 19 Aug 2022 16:00:29 +0200 Message-Id: <20220819140035.32760-16-stefan.herbrechtsmeier-oss@weidmueller.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220819140035.32760-1-stefan.herbrechtsmeier-oss@weidmueller.com> References: <20220819140035.32760-1-stefan.herbrechtsmeier-oss@weidmueller.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AS4P251CA0011.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:5d2::7) To PAXPR08MB6969.eurprd08.prod.outlook.com (2603:10a6:102:1d8::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2aa0f456-703e-4dc9-74c3-08da81eb3fa3 X-MS-TrafficTypeDiagnostic: DU2PR08MB7373:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4lk16L7q6P6srdScFvyUG4BNx3sNlaosvmKOWqtCBVZc3yElOJoe8GuqtHduYn3RsBpT9yQEHm262ylkAyd5rj4IKIjyFObfN574DWoCI5iMnEKWbveHkHYV+Keiix4ancVEaLxvKaQo54InHkWDwsEmwLETrNrFUc47Ux6KuUiqMMAX+9zPWDA5wlE9/galcHYN6zKtdtAR4cEPQXf/DYNrlelYCqciHpKU6vehBYtLIJZ98C7hqwlf4oTdDLEacZBhZ7yTghvOcklrDKAc1MfFcape2FpYXSOwSjrhwQ7PRHxmFP6RMaizDb0/RuOm0xwHJCzVwfSzgNaVKC6GNKv/djtGGnVco144y7+5cmI0C17Kp1RIOK/U2f2dekMLk7FBMpkbqk5HeQp5do/FBFH2/P04AlU+4S2MnmXhG0tfjXn/l9HD9n8ArxkWXQ05S7fFo9u2qY0X8Txk334jl04e7qJgwcG7RGFZIpQ4H81tqadBjclUcv+XIOukIivdgi7ohqDAa7AfZ4+1ooR+UJ90nOE1hiKNCqLtVpc1YT4GVOjCeYYT+3qLPgG2t1w7SGTRCb0Lc1V6hXHHGtdVKyVvqgJoYPC9OFOj+xbj0epaMrbwJKKEVBMUAy1y2Wp7LNJsdgp53eQ4SpfcrvkMPdAupt93jf/Hktg4z9byYZC9rVdE2hI8sSpz/5Wo4ZOWJBiU8+UTzexUhQiBf9t3h2u/2mnIQslJzBGWPh8f6o8LFuJ9fvGv/rZTCNUmir8YhOM0Ij1ocRP85zbdbieMPfcpBqOfBYTmJTBDkZ6G6rw= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR08MB6969.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(39860400002)(346002)(366004)(136003)(396003)(376002)(4326008)(41300700001)(52116002)(6506007)(6666004)(186003)(38100700002)(36756003)(54906003)(6916009)(5660300002)(38350700002)(8936002)(316002)(2906002)(26005)(1076003)(8676002)(6486002)(86362001)(478600001)(6512007)(66946007)(66556008)(66476007)(966005)(2616005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: VFz3JFIqShZe2dXfqTxyaIx9hDSE8eKsXUwqJMoqjFRD8AtptUmBVVkk4oDuGKXOc3eYt5PeYEv6EezNfuUFt9H1+7uIw+eXe67PGI1ONvouABDeft+r35QiFdHgj/f0+CaJ19Pg0NYzvaMTM97O6lmh0mc0u92rozBoT/NUZwP7PlXhrYQB4HT/Uno6uzTAeQzag22IqKUKYmqO76RVHGDtEyrC/INaL0UUs2U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om8j14fAo55FVFYjV9HmwrOtcTkXFkodO3SkdsVQN8pirKz2Ya13V2EVBIl8sTaHhh/0uuM6rJ20pF75wHEoZK7gwhgltZvMX9NTlIUfepZ+AR3FbE0WanChBoBYcgoZG5T+r6SnY3vSpf/XGW67IZhwgQa21ENUxtE4KM4lFrqBIhFzj1g2zCTirM0Q/ZHZRldIpu7Zu+yS/sMKY+h2fYb1Z/GU2JzDWLc4RkJk71L917zoMWN/3Fm0NcLT32da5MAcqgZcbvoGe44HDwf7TrCnoAcmaqjtI+705yE0GODcV/mA== X-OriginatorOrg: weidmueller.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2aa0f456-703e-4dc9-74c3-08da81eb3fa3 X-MS-Exchange-CrossTenant-AuthSource: PAXPR08MB6969.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2022 14:01:01.2427 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e4289438-1c5f-4c95-a51a-ee553b8b18ec X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tXODxIdFfXo0Gju4FSp772fCUKw8KRpJcpTZ5KuhxXahabGTsBupDjAWSviBEf4yvm62xpIlH9nq5hVkwyskuQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR08MB7373 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean |
Series |
binman: Rework compression support
|
expand
|
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index ffcd7d2567..bbb2fa19c1 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -5779,6 +5779,32 @@ fdt fdtmap Extract the devicetree blob from the fdtmap self._DoTestFile('237_compress_dtb_invalid.dts') self.assertIn("Unknown algorithm 'invalid'", str(e.exception)) + def testCompUtilCompressions(self): + """Test compression algorithms""" + for bintool in self.comp_bintools.values(): + self._CheckBintool(bintool) + data = bintool.compress(COMPRESS_DATA) + self.assertNotEqual(COMPRESS_DATA, data) + orig = bintool.decompress(data) + self.assertEquals(COMPRESS_DATA, orig) + + def testCompUtilVersions(self): + """Test tool version of compression algorithms""" + for bintool in self.comp_bintools.values(): + self._CheckBintool(bintool) + version = bintool.version() + self.assertRegex(version, '^v?[0-9]+[0-9.]*') + + def testCompUtilPadding(self): + """Test padding of compression algorithms""" + for bintool in self.comp_bintools.values(): + self._CheckBintool(bintool) + data = bintool.compress(COMPRESS_DATA) + self.assertNotEqual(COMPRESS_DATA, data) + data += tools.get_bytes(0, 64) + orig = bintool.decompress(data) + self.assertEquals(COMPRESS_DATA, orig) + if __name__ == "__main__": unittest.main()