Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1873606A68A for ; Wed, 2 Dec 2026 21:12:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=ezIMg9Fm; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=cCVZVAaC Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xYrcp-0007n7-66; Wed, 02 Dec 2026 16:12:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xYrci-0007lk-Dr for qemu-arm@nongnu.org; Wed, 02 Dec 2026 16:12:24 -0500 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xYrcd-0007lN-0V for qemu-arm@nongnu.org; Wed, 02 Dec 2026 16:12:18 -0500 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B2Iu3IC3206358 for ; Wed, 2 Dec 2026 21:12:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= HSnyKKICQVhnLffUbYxGu/rnMbqMm9+yR+7x5EjLp9w=; b=ezIMg9FmeP+SNgHz KmJaRo+E/4yoJcWqKmMpOy9Br/04QbDvQ3QxL1UpM3ToNL2hnuvQzjkfGS8ezrHL Y1eUm4f+JRBDDpUjcZD+RsG6C1qoFAoLJU8oBj91mQO8vCgojLf3ilFZs8BlJr+o rz3keRLBF84jx3fVxuUTc3u9nlhZ1EJ/ZYQKjWSrgl5iF7buE8hc9vaN1AUl0i9v x9aRr46l3sy8PdRRtbH/m+NMbXgyp4gEHv4VYQSvE90+NKVo6I9qQXSxcfJvQVh8 gRxdi+idlrF/rJjeL4tvwhoQUb5Sl/q13X4tSAx65hh/cr2ME3DMlHM5Vaq807Fk fde7/g== Received: from mail-dl1-f70.google.com (mail-dl1-f70.google.com [74.125.82.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4jaj56jb4c-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 02 Dec 2026 21:12:13 +0000 (GMT) Received: by mail-dl1-f70.google.com with SMTP id a92af1059eb24-1383723dfddso1807202c88.0 for ; Wed, 02 Dec 2026 13:12:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796245932; x=1796850732; darn=nongnu.org; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=HSnyKKICQVhnLffUbYxGu/rnMbqMm9+yR+7x5EjLp9w=; b=cCVZVAaCpn1a2+Dp331ToAEr6EC5yuVkI1umNNA4ZZS63RCanBlU94P+jADUzAgo/f PRqa2cm98mLZhSLOmHQEcDggP3snrcvXd/npbAKAc0BiW4gmPWTUJ5OZd656YvZTfp2c D5pXxmAay7MhH40L8oygU/0aokbGHxaoAyLlFwB+hzq3i8BoT1pIozuv0Hlb6lU7h6VE uzQcz/GHtQTrQjhIxATYZGRDOvj1Zcz7OC4v9Hmiwxlq46e0hskHbbSG1NUDx41PS2sO E7rAGvM7VWz7ZOT0u8qUjlrifAIAZ2dXj0vBvcYH97a7jzYdYufARUbcZU8L4cQRwZuy VYMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796245932; x=1796850732; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=HSnyKKICQVhnLffUbYxGu/rnMbqMm9+yR+7x5EjLp9w=; b=g7wNZw07q1k0wpH5Zu8VSMUsUSkHxTivv2EoFJFAnjDASUotyLpJ4fCHgx9R3gHqIe PpB0NYCpWCfIDdOOlfBbRskwErLVNUHC8qArDusa94usJ8C4NcK6/v4EWbaTIKyxK7QD o1qwJrezAh/CTGl4hCbIDFwio42gEH3ZCdAQj5AzVaoIKvA+mN2yOHa6+/3MNzfVOKOt YlPhL6U5N9uEmNctYDdhhbPKX6QN1KYlIQIKPvAPwq7WWWQd943dH6GQdW+qrAnqgsU3 /coO9bp474Bp/aGM8nrBnIt00v837Qayo1uqb5qon+yJ29ZyqOI64XfLrtHa89NGadk+ pv7w== X-Forwarded-Encrypted: i=1; AL+hErEs3qhyG5BVie4mzqldE9BitwqtM+S65NdiPkOD8xn/jcQqjGQVBt2AqsP1bnt8CpUT9DsI3bCvAA==@nongnu.org X-Gm-Message-State: APuU4Z8MTCFQvRDBzv0DGFSILvoOk10ky+rhbGlQbvKeqB1cQBrhStpm VjlGeDHENOUAAC0bFm9kmnrKdvaicb6f7lOe4c0PAxUeTMRFh+wUvvaMBNqTiwb/ua5PGwXel9F /x3itcjr+3YH1e3d5mhfQTkgT7Bq5b1/NFuuXe4odKbIP+LDW6DfDFQ8= X-Gm-Gg: AZFdTZeFMoXPFZirSAbJipzGX0pt56MJexWJs2d/WWvBZkWAnwusKB2DxkygIHeZPDS 4kauIaSrXu1VK/U0nfIXfYa6qWP4LlKV96a2rZuPbIPke4O9C7DFCHhIw3FdWGLLYjta1m4DNrz YCdSPBmWqmRV1wWeFM+PHD+ZoZLWOqiRtJ01duDYdqzwwC7KzfIQ2fQY+q4Xr53PGealg7hnnlJ 4LUvhnZ8kd+f0TWusSisw/eIKHhV1KigoTJcr21bPi7lnvNaEFC3QidHpB9pSAdWV3FR9Wgs7to M9IlfasT1Y5JLIVYbTWslpy/vGGnR3WbyB5E3rC/PNo6gSg4tp12PfcNL3NNxV5JCVVLs9F5a1Y 0r/2uouTqDYxx2iuz4lForLn6qtladqf1/B1STSMt7QquhiwXRBGf87e6c646zxFWKyeUWWAy4J fgEgN8nIdsU98ailLMWwZ5Tl9/39cGm/uu8/o2ICs3Yg== X-Received: by 2002:a05:701b:2815:b0:1b5:22d1:1eb5 with SMTP id a92af1059eb24-1b55693615emr41422636c88.37.1796245931753; Wed, 02 Dec 2026 13:12:11 -0800 (PST) X-Received: by 2002:a05:701b:2815:b0:1b5:22d1:1eb5 with SMTP id a92af1059eb24-1b55693615emr41422560c88.37.1796245930875; Wed, 02 Dec 2026 13:12:10 -0800 (PST) Received: from [192.168.1.199] (192-80-163-190.dyn.novuscom.net. [192.80.163.190]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b55681301asm95678076c88.8.2026.12.02.13.12.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Dec 2026 13:12:10 -0800 (PST) Message-ID: <35f2b44e-e531-447c-a5ef-d6bff75a146f@oss.qualcomm.com> Date: Wed, 2 Dec 2026 13:12:07 -0800 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 2/6] scripts/tests: add regen-reference.sh To: =?UTF-8?Q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Cc: Aurelien Jarno , =?UTF-8?Q?Daniel_P=2E_Berrang=C3=A9?= , Chinmay Rath , Helge Deller , Chao Liu , Weiwei Li , David Hildenbrand , =?UTF-8?Q?Marc-Andr=C3=A9_Lureau?= , LIU Zhiwei , qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, Brian Cain , Alistair Francis , Ilya Leoshkevich , =?UTF-8?Q?Philippe_Mathieu-Daud=C3=A9?= , Song Gao <17746591750@163.com>, Palmer Dabbelt , qemu-arm@nongnu.org, Stafford Horne , Peter Maydell , Yoshinori Sato , qemu-ppc@nongnu.org, Daniel Henrique Barboza , Bibo Mao , Xianglai Li , Laurent Vivier , Jiaxun Yang , Richard Henderson , Harsh Prateek Bora , Nicholas Piggin , Aleksandar Rikalo , Paolo Bonzini , Glenn Miles References: <20261201113005.394788-1-alex.bennee@linaro.org> <20261201113005.394788-3-alex.bennee@linaro.org> From: Pierrick Bouvier Content-Language: en-US In-Reply-To: <20261201113005.394788-3-alex.bennee@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAyMDA4NCBTYWx0ZWRfXzVJEZcKuBkoG rGqLCCJGFd94pKPIzwuBfp/ynEOHPcapi+6OK6jiKKaO1vvUEL/aLlZ1C3lR+0QTyDoYzcd9791 UKnHztvO4rKNaNZnsNWPiXmUp1r86p9MchtXC1UGakI2ydmKiWA4IkelESoN/W7eeeNGfTqfbHF lc/B5Sdp4xvb6ZLaaGjImHNF32FYvmNNGa1bU0am7B0w/nrCNp52tocZYQyyX99wLhQXipW66zk qZyVt0cDBUODL71r78s8dYN0shALNa1vVycH+iUzcZaaEKXYAQiqytAMJa5pMOwDcIsso1lSPJ0 84h2PLTmvaWIDnr7JG8mTasjJs+0j7xgVQTZJTn/AXi8RjV2knn+aAhjbExrVTdTw9M3bV8h2B/ 7an33h3622Xx2n1jFXYyq4scb+hKEyvV6NWoZgd/hD6AyzKj0BewwPKb+aR4QRoh40GxhdSyLOo Cemu/7hbufE4FIP3eug== X-Authority-Analysis: v=2.4 cv=OtXaWC/t c=1 sm=1 tr=0 ts=6b1089ad cx=c_pps a=SvEPeNj+VMjHSW//kvnxuw==:117 a=9852oil1ID9t5xBSyQ/BEA==:17 a=IkcTkHD0fZMA:10 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=ce4E9WndWQDvi_UFWYwA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=Kq8ClHjjuc5pcCNDwlU0:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: 1yltE4KUMBY5Br5nNkuX1D3s1m9AgGUY X-Proofpoint-ORIG-GUID: 1yltE4KUMBY5Br5nNkuX1D3s1m9AgGUY X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAyMDA4NCBTYWx0ZWRfX/UycHV78kk9Z C13cG+hs3vJJkBjSTphBnEyhM5hXki/ClFFW0P5Dkg6rZMdE4giH6IXpiaSBxkUMyOVjDQrkLF/ jR7/6ST+9rawjyPqPphrCyLcfHqCNZ8= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-02_05,2026-12-02_07,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 adultscore=0 bulkscore=0 lowpriorityscore=0 priorityscore=1501 impostorscore=0 spamscore=0 suspectscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612020084 Received-SPF: pass client-ip=205.220.180.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On 12/1/2026 3:30 AM, Alex Bennée wrote: > While we should verify references with real hardware we don't have > hardware for all cases. Since the meson conversion we've made > reference files mandatory so lets include a helper script to make > things a bit easier to update. > > Signed-off-by: Alex Bennée > > --- > v2 > - moved the refs to the next patch > --- > scripts/tests/regen-reference.sh | 87 ++++++++++++++++++++++++++++++++ > 1 file changed, 87 insertions(+) > create mode 100755 scripts/tests/regen-reference.sh > > diff --git a/scripts/tests/regen-reference.sh b/scripts/tests/regen-reference.sh > new file mode 100755 > index 00000000000..0600b56bef8 > --- /dev/null > +++ b/scripts/tests/regen-reference.sh > @@ -0,0 +1,87 @@ > +#!/bin/sh > +# > +# Regenerate TCG test reference files. > +# > +# SPDX-License-Identifier: GPL-2.0-or-later > + > +set -eu > + > +usage() { > + cat < +Usage: ./run $(basename "$0") [-n] > + > +Regenerate TCG reference (.ref) files for tests matching . > +This script must be executed from inside a QEMU build directory using the './run' wrapper. > + > +Options: > + -n Dry run (print commands without executing or overwriting files) > + -h Show this help message > +EOF > + exit "${1:-1}" > +} > + > +DRY_RUN=0 > + > +while getopts "nh" opt; do > + case "$opt" in > + n) DRY_RUN=1 ;; > + h) usage 0 ;; > + *) usage 1 ;; > + esac > +done > +shift $((OPTIND - 1)) > + > +if [ $# -lt 1 ]; then > + usage 1 > +fi > + > +TEST_PATTERN="$1" > + > +# Must be run using the ./run wrapper which provides MESON_SOURCE_ROOT and MESON_BUILD_ROOT > +if [ -z "${MESON_SOURCE_ROOT:-}" ] || [ -z "${MESON_BUILD_ROOT:-}" ]; then > + echo "Error: MESON_SOURCE_ROOT or MESON_BUILD_ROOT is not set." >&2 > + echo "This script must be executed from inside a build directory using the './run' wrapper, e.g.:" >&2 > + echo " cd && ./run \$PWD/../scripts/tests/regen-reference.sh ${TEST_PATTERN}" >&2 > + exit 1 > +fi > + > +SRC_ROOT="$MESON_SOURCE_ROOT" > +BUILD_DIR="$MESON_BUILD_ROOT" > + > +# Ensure we are inside the build directory > +if [ ! -f "build.ninja" ] || [ "$(pwd -P)" != "$(cd "$BUILD_DIR" && pwd -P)" ]; then > + echo "Error: This script must be executed from inside the build directory." >&2 > + echo "Please cd into your build directory and run via './run'." >&2 > + exit 1 > +fi > + > +echo "!!! Warning: about to regenerate with TCG !!!" > +echo "You should verify the real hardware generates the same reference files where you can" > + > +# Query meson test list > +TEST_LIST=$(meson test --suite tcg --list "*${TEST_PATTERN}*" | grep -v "plugin") > + > +while IFS= read -r line; do > + case "$line" in > + *" / "*) > + test_name="${line##* / }" > + case "$test_name" in > + *-linux-user-*) > + arch="${test_name%%-linux-user-*}" > + test_base="${test_name#*-linux-user-}" > + > + qemu_bin="./qemu-${arch}" > + test_bin="tests/tcg/${test_name}.test" > + ref_file="${SRC_ROOT}/tests/tcg/${arch}/${test_base}.ref" > + > + echo "${qemu_bin} ${test_bin} > ${ref_file}" > + if [ "$DRY_RUN" -eq 0 ]; then > + "${qemu_bin}" "${test_bin}" > "${ref_file}" > + fi > + ;; > + esac > + ;; > + esac > +done < +$TEST_LIST > +EOF See original review here: https://lore.kernel.org/qemu-devel/6dc1341f-5c1b-4e81-8ec4-a3c522f76980@oss.qualcomm.com/