From patchwork Mon Jan 27 15:49:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1229920 X-Patchwork-Delegate: sjg@chromium.org 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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=TAP1jGon; 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 485vS43wwRz9sPJ for ; Tue, 28 Jan 2020 02:53:56 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4D1ED81A68; Mon, 27 Jan 2020 16:51:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (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=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="TAP1jGon"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D65FB81A21; Mon, 27 Jan 2020 16:50:37 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) (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 53D2C819A9 for ; Mon, 27 Jan 2020 16:50:25 +0100 (CET) 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-xd44.google.com with SMTP id z193so10522687iof.1 for ; Mon, 27 Jan 2020 07:50:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VfzuRdVZ25ZywkPknIxkvbeNJRLH7IOhtb+pLtUInKg=; b=TAP1jGonJvP/zqYHIdb2y11Nm0WiqC5v/YHYIM/X5nO3fj5iS6R0igbYqqQfH/8vac mMZ1Jifj2Fy/E5Wq9F1Vv+LqSGodyjQQPVtH+M5ayHTdWFseDNkGjquEIRiC0jHEV2mP 5PYes1JQjhaqnWt4JeRgvOOJKP271VMxjklm4= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=VfzuRdVZ25ZywkPknIxkvbeNJRLH7IOhtb+pLtUInKg=; b=g5JiyH0CJ4/+BzvtandsKKJMLrwOMUXke3nNxRgGHKktlgBO6dTaMe2Y9bMStWfVm2 gS3K6Tq63HpOXfVZvtR1do3icDuuD9qkK4vO03/+U7DUpH4LI01CL4a5KWRjk/SHZhdx 2Qbzhv7IyjC3jjmwv0g03pNWmPfXb/QNWn+Mgco/KtB8D/sVjNaKGeB0XuGAqefv5wHz +u9BY+jVwsntk1U7Wk7cqLhStFE5pN2YncMrMnIdCPNzaqgzcgCG3+URK82KzPTFGtxR mElkLNPGRtTvb4XMfyTdvhzNbIp+9ET0+ijyQNEcRn5qJeXNZdtuxRmteOinnJS3oTrH sK+A== X-Gm-Message-State: APjAAAXfz/5AUE0RoZP9/dF8dfUj5ElZD0A+jkDgKMYeW0QIoDNhSv1W PO0QC2t7Z6VtCmkuX9uvfKZkDl/3Jts= X-Google-Smtp-Source: APXvYqyKE/ItmTm+1rGKtQvLMOm/dx4ZHDmFWWjTf4osxATkRDUUdkeRPyqiq8q4eaW1ksM+wcCNsw== X-Received: by 2002:a02:ce87:: with SMTP id y7mr10834827jaq.26.1580140223982; Mon, 27 Jan 2020 07:50:23 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id v7sm3576560iom.58.2020.01.27.07.50.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2020 07:50:23 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH 20/21] test: Enable console recording in tests Date: Mon, 27 Jan 2020 08:49:55 -0700 Message-Id: <20200127084920.20.I0d843e524c54d3c7a29919c95929b1909b9eaa61@changeid> X-Mailer: git-send-email 2.25.0.341.g760bfbb309-goog In-Reply-To: <20200127154956.64368-1-sjg@chromium.org> References: <20200127154956.64368-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 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.101.4 at phobos.denx.de X-Virus-Status: Clean At present we reset the console buffer before each test but do not actually set the recording flag. Without this, the output is not recorded. Update the code to set the flag before the test and clear it afterwards. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- test/dm/test-main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/dm/test-main.c b/test/dm/test-main.c index 72648162a9..d7dc8d1f91 100644 --- a/test/dm/test-main.c +++ b/test/dm/test-main.c @@ -97,11 +97,11 @@ static int dm_do_test(struct unit_test_state *uts, struct unit_test *test, * Silence the console and rely on console recording to get * our output. */ - console_record_reset(); + console_record_reset_enable(); if (!state->show_test_output) gd->flags |= GD_FLG_SILENT; test->func(uts); - gd->flags &= ~GD_FLG_SILENT; + gd->flags &= ~(GD_FLG_SILENT | GD_FLG_RECORD); state_set_skip_delays(false); ut_assertok(dm_test_destroy(uts));