From patchwork Sat Aug 13 17:40:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1666128 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=PsZqN4lq; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4M4ntM51jrz9sGP for ; Sun, 14 Aug 2022 03:42:19 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B4B798496C; Sat, 13 Aug 2022 19:41:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="PsZqN4lq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D1804848EC; Sat, 13 Aug 2022 19:41:11 +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=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C271B84847 for ; Sat, 13 Aug 2022 19:41:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2c.google.com with SMTP id b142so183368iof.10 for ; Sat, 13 Aug 2022 10:41:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=RFNV5/Kfty/Md8wr5njJ59Xu3orsXrAJ81pxFR0wvmQ=; b=PsZqN4lqMC5aSTiRyT2PvvI9h6UgcIy0SgbBrSlqJW4rfcaisNbCDa6Pyl8aTR6SAT U7eJWVZQy7hurgtwJp4FNVdfjjbaldrGHEVO6fBWtMWQhtXYDZZDQl+x9CMHivCcLACI ep6ZWlKlzFfKUvg5QyAwriAx8/nmDsHqJIrQ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=RFNV5/Kfty/Md8wr5njJ59Xu3orsXrAJ81pxFR0wvmQ=; b=0l458zCx4V7rJ+Q+ctD2uUwzU7fvN1beAHrcEE11rfjN447EkCd1dDxS7TnoSKxR52 RObactK8C+Hr69YR7TL8ksTCXnyc6q2LnT5gAmq68LByqfFpDcpuCBFKlcs0O3arFy4P Lclv9ZhHs/IR3W0zx+6ulay7mBuOxiZWJiyYoi0klHfupBPu0Gq9kqcRjIBaazg7d23S i+5XYHTat/cES10v3zAJuzSNyNf5V0BC1WqqV5ufYT6G6alWyj+Eypsov4tFnISRMxaX 7htWNLXt6SLg2h0qtFzJvHG5nM1WTgs1/0HcO2pFRRPw6nEopWdu1N7GAm3qPCdUupgu KBZQ== X-Gm-Message-State: ACgBeo04CLSR7rMUwtyhpKOoBl1Vt7qre1PN80/gye9rHT2yMRMGATIr nBkWMh4AF4iUJfxbeqWpkNAtNUbzC/9cRw== X-Google-Smtp-Source: AA6agR5TY+fh86WZqKcKq3voQzGYsZvUVd6W3IPmznz5rN1nZkSCEYU5qzN44jdNgZIDWmPf+WJVoQ== X-Received: by 2002:a05:6638:3450:b0:343:3c23:ec7e with SMTP id q16-20020a056638345000b003433c23ec7emr4251302jav.67.1660412464127; Sat, 13 Aug 2022 10:41:04 -0700 (PDT) Received: from sjg1.roam.corp.google.com (c-67-190-102-125.hsd1.co.comcast.net. [67.190.102.125]) by smtp.gmail.com with ESMTPSA id u8-20020a02aa88000000b00339e669df91sm1224656jai.153.2022.08.13.10.41.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Aug 2022 10:41:03 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Quentin Schulz , Alper Nebi Yasak , Philippe Reynes , Marek Vasut , Simon Glass Subject: [PATCH v2 07/11] binman: Avoid use of expected failure Date: Sat, 13 Aug 2022 11:40:46 -0600 Message-Id: <20220813174051.1813081-8-sjg@chromium.org> X-Mailer: git-send-email 2.37.1.595.g718a3a8f04-goog In-Reply-To: <20220813174051.1813081-1-sjg@chromium.org> References: <20220813174051.1813081-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean The testReplaceSectionSimple() test is the only one which expects failure. It looks odd in the output and takes time to glance at it to see that all is in fact well. Also it does not check that the right exception is generated. Use the more common (in binman) approach of checking for an exception. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/ftest.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 4f696c68600..ac54183c399 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -5712,14 +5712,15 @@ fdt fdtmap Extract the devicetree blob from the fdtmap self.assertIsNotNone(path) self.assertEqual(expected_fdtmap, fdtmap) - @unittest.expectedFailure def testReplaceSectionSimple(self): """Test replacing a simple section with arbitrary data""" new_data = b'w' * len(COMPRESS_DATA + U_BOOT_DATA) - data, expected_fdtmap, _ = self._RunReplaceCmd( - 'section', new_data, - dts='234_replace_section_simple.dts') - self.assertEqual(new_data, data) + with self.assertRaises(ValueError) as exc: + self._RunReplaceCmd('section', new_data, + dts='234_replace_section_simple.dts') + self.assertIn( + "Node '/section': Replacing sections is not implemented yet", + str(exc.exception)) if __name__ == "__main__":