From nobody Tue Feb 10 20:07:06 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1552407379400644.1455014623286; Tue, 12 Mar 2019 09:16:19 -0700 (PDT) Received: from localhost ([127.0.0.1]:55182 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3k4c-000381-5C for importer@patchew.org; Tue, 12 Mar 2019 12:16:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3jtd-0001np-EC for qemu-devel@nongnu.org; Tue, 12 Mar 2019 12:04:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3jom-0000KE-Lf for qemu-devel@nongnu.org; Tue, 12 Mar 2019 11:59:53 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:55648) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3jom-0000Jc-Df for qemu-devel@nongnu.org; Tue, 12 Mar 2019 11:59:52 -0400 Received: by mail-wm1-x335.google.com with SMTP id 4so3237528wmf.5 for ; Tue, 12 Mar 2019 08:59:52 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id s127sm2441576wmf.39.2019.03.12.08.59.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2019 08:59:49 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id ADCF81FF8C; Tue, 12 Mar 2019 15:59:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8tyfGv8A/SPNyaMgqFoHwJAVoiY6Q6h0GkHE8ilAcZY=; b=D9e1zhWPw2BWvi9ZbvCkxbapzHTuPsiZ+upmX5i4CvIchCIB6S3vLmzNur8EveXqP2 ZFyQjbsatzRjzBAzpMcOTukfCaK5Jj5qAxJXcFqCMesAMyIipXEgFL6tb6ILOYo1MFb/ pKdXG/PdXbyks3xf4B3tkaqZVGOvyKC0Z7K6ECtbA2YpYuGyYZhe99T9578mDbLpap1o g5fWQCWJ9mXa7cV3OZ2eS98CPr/GYfWg6LsCZ+BTkdlFqVWk0moF5zi6LrBYP9P9gGp9 IzEpyDh0JRwsE/bXOWawNq5stQxw6jKks9m+5EBTTkfKnNhBWJ6wWTf4dfRsIC5jklS/ U34g== 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=8tyfGv8A/SPNyaMgqFoHwJAVoiY6Q6h0GkHE8ilAcZY=; b=EpqP9VuQk4p5WIea1vduZj2iyxCb9c9zRrgyL6s+yPkfAsadVdLc/BdRBpwmiYe+vf ywHxBgWsvxeCUPX5AR37/ls0bpVqbd3xUY/fwhk+ghNP28zkKw8hvTh4LAvaw6IFZHZd yKbHOFT5lbRHyDx3yZApNO7aGnAyaGok2LeziuXlXNUZIbxdcA8xYaHC2tPWoMvFlRx+ i0RNTY/3Hro0U3oTDI11gV3sgCcPRKoDGN3v1EAbTMdrt+MRhgfEKZkuVpoT0zQZvjB3 LSZAAvHqdYx2GXcT9Bfh+C/Pe8ELHE8FxKVXuiUZ4VIR85UJbKPwEelG92lrRDnirhsr EDYQ== X-Gm-Message-State: APjAAAVmWqbD/1T5RTOrAeuFyYzCbXU5Ndq0uXLtSS1WJzoPlPB7jiJB Wg95xHLsrw6+5rb6m2Sy6X8voA== X-Google-Smtp-Source: APXvYqybphZ+SsHoZ5ZpaWyIGJ9d2+f2jGyCAAVD+ANlngd3OVwVsL9JTcGGytJB7KHNu6HRwAiAAA== X-Received: by 2002:a1c:730d:: with SMTP id d13mr2952233wmb.37.1552406391299; Tue, 12 Mar 2019 08:59:51 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 12 Mar 2019 15:59:30 +0000 Message-Id: <20190312155947.14918-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190312155947.14918-1-alex.bennee@linaro.org> References: <20190312155947.14918-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::335 Subject: [Qemu-devel] [PATCH v4 04/21] tests/tcg: split run-test into user and system variants X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, famz@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, agraf@suse.de, cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We can't rely on shell redirect magic to get things right so lets setup a common output chardev that is expecting to write to files. As we have split run-test up we might as well move the default monitor bits into the call. Finally a little make sophistry is required to correctly quote $(COMMA) and as we don't inherit common rules we have our own little copy here. Signed-off-by: Alex Benn=C3=A9e --- tests/tcg/Makefile | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile index 454d0a4119..d26a36df61 100644 --- a/tests/tcg/Makefile +++ b/tests/tcg/Makefile @@ -32,10 +32,17 @@ -include ../../config-host.mak -include ../config-target.mak =20 +# for including , in command strings +COMMA :=3D , + quiet-command =3D $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1= , @$1)) =20 # $1 =3D test name, $2 =3D cmd, $3 =3D desc +ifdef CONFIG_USER_ONLY run-test =3D $(call quiet-command, timeout $(TIMEOUT) $2 > $1.out,"TEST",$= 3) +else +run-test =3D $(call quiet-command, timeout $(TIMEOUT) $2,"TEST",$3) +endif =20 # $1 =3D test name, $2 =3D reference diff-out =3D $(call quiet-command, diff -u $1.out $2 | head -n 10,"DIFF","= $1.out with $2") @@ -54,11 +61,10 @@ LDFLAGS=3D # The QEMU for this TARGET ifdef CONFIG_USER_ONLY QEMU=3D../qemu-$(TARGET_NAME) -QEMU_OPTS=3D else QEMU=3D../qemu-system-$(TARGET_NAME) -QEMU_OPTS=3D-monitor none -display none endif +QEMU_OPTS=3D =20 =20 # If TCG debugging is enabled things are a lot slower @@ -110,8 +116,17 @@ all: $(TESTS) RUN_TESTS=3D$(patsubst %,run-%, $(TESTS)) RUN_TESTS+=3D$(EXTRA_RUNS) =20 +ifdef CONFIG_USER_ONLY run-%: % $(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<, "$< on $(TARGET_NAME)") +else +run-%: % + $(call run-test, $<, \ + $(QEMU) -monitor none -display none \ + -chardev file$(COMMA)path=3D$<.out$(COMMA)id=3Doutput \ + $(QEMU_OPTS) $<, \ + "$< on $(TARGET_NAME)") +endif =20 .PHONY: run run: $(RUN_TESTS) --=20 2.20.1