From patchwork Sat Oct 17 13:19:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1383657 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=ljxsw+94; dkim-atps=neutral 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 (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CD3YW6xP0z9sSf for ; Sun, 18 Oct 2020 00:20:35 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9C5BB821A4; Sat, 17 Oct 2020 15:20:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ljxsw+94"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A7319821DB; Sat, 17 Oct 2020 15:20:18 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) (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 2792E81BD2 for ; Sat, 17 Oct 2020 15:20:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-io1-xd43.google.com with SMTP id b15so3521225iod.13 for ; Sat, 17 Oct 2020 06:20:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=deOVQ3c/n2uepsvXvfgfP7vukg8OA1iPDO/7MvPzzIg=; b=ljxsw+94totMPyeWpj+syazyUji6fJFZ13KDLNvEt1YGAizNu+Ez/2E0AFFhPw5RPa WnD54/d7ZlhV4Uj588F2P/faMAIx/oTRzkKiPFaS4hbsCv6OfZT174s9P+1gGGjAmaa4 ODXuTdTbYq3m1SkAoBHB9UwGvkVrzzlSHHi3iG2In5MG8R2TJiCGgKm1IBkHSXDf1wDJ e7noZoA37TCq5i5VE1WAonxNzMn8GMfkkjVEfRjymsxqoUZlLH24YwNY52M5jz+ri9b2 xExnce0VGlzyqrI5gfcYxeNBCi25IRL5qWWy2lqZ8FvQBKpA1wZmA+D79zsK8dhXYBd8 lOFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=deOVQ3c/n2uepsvXvfgfP7vukg8OA1iPDO/7MvPzzIg=; b=mxirbxRbE0zDn+OYJWSsC1EA9P7vO7+u7kfl0b/ok0dtfTX64kMYQrt+C5tKXhMAk3 DrXST/+v5O2LU3aSiTcpvazYRuFKeSWwN0BaQ7+53K//Gahz1GdauTEg26MTdMLOmlZF 7D7JAfGbHX4jvqP64tJF6kWGhUnxUcv79o5bfn41C71OdTvpuF6x7kCSdOASrqsA/GEn yzQtZpmz//j5f3SJonMEkuwe559uEo6z1e/IaSkW5NNzjKSr6lXYxRIZnZoIYsAmEFYw yQHa7LyMbI483fqMgTjuWyBUh2I0Z3qcaTo6GjfFO8SMwrBG4IRmQb3wPdg5lfLOJFgr 1lpQ== X-Gm-Message-State: AOAM531exN90oQ7szW+Id6Geg7h4+aoAWNKRwArAnAnr4WaG8Kx1T708 CaGHxA3jG2MQIic5k66N1M+tDEqQGFDhoMMA X-Google-Smtp-Source: ABdhPJxLJIDevw7fH1L8hGIIPgTMNHS7ML1zwczJ9trYcpJNMJB1ZJzSxSlXudGsqJRszmPTQ2ZpGQ== X-Received: by 2002:a6b:6610:: with SMTP id a16mr5766811ioc.108.1602940814660; Sat, 17 Oct 2020 06:20:14 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id k8sm15536ilh.8.2020.10.17.06.20.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Oct 2020 06:20:13 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Simon Glass , Sean Anderson Subject: [PATCH] test: log: Actually test enable/disable output Date: Sat, 17 Oct 2020 09:19:58 -0400 Message-Id: <20201017131959.31551-1-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean Strings are truth-y in python, so ``assert 'anything'`` will always evaluate to True. Fix the test so that it actually checks the output. Fixes: 3d03ab6361 ("log: Add a way to enable/disable a log device") Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- test/py/tests/test_log.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/py/tests/test_log.py b/test/py/tests/test_log.py index 275f9382d2..e8b2b17145 100644 --- a/test/py/tests/test_log.py +++ b/test/py/tests/test_log.py @@ -95,9 +95,9 @@ def test_log(u_boot_console): def test11(): """Test use of log_device_set_enable()""" lines = run_test(11) - assert 'log_test() default' + assert 'log_test() default' == next(lines) # disabled should not be displayed - assert 'log_test() enabled' + assert 'log_test() enabled' == next(lines) # TODO(sjg@chromium.org): Consider structuring this as separate tests cons = u_boot_console