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 9E0A4606A320 for ; Mon, 30 Nov 2026 20:34:41 +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=C7G9pQOd; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=KxBfL+Wu Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xY84x-0001EP-H9; Mon, 30 Nov 2026 15:34:27 -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 1xY84v-0001Cm-8b for qemu-riscv@nongnu.org; Mon, 30 Nov 2026 15:34:25 -0500 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xY84s-0005Sg-Vf for qemu-riscv@nongnu.org; Mon, 30 Nov 2026 15:34:24 -0500 Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6AUKQDan2032738 for ; Mon, 30 Nov 2026 20:34:21 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= q24Phj0GWHpSZjUhO6iKVcXLmoRgiIVRx4j9lCa5JvQ=; b=C7G9pQOdd7ZUIUoS 5Z04BsnUZC8r4htGidU+sEMJuDluxHmedMDEI+FoyyVQ46zXAr1F8iUN3Ue+sDD6 uvmBTF60amhSq7CNN1zZQ8/Ckf2dq2dUk5K831J5NehsGYKDLFI6WPlHkYNCvPCY K3Nc/cXg1vR9MwBpn6PwdCy1wJJj9S6nZRd/kpy14xIVSBrjxdIy11RVbFD7FwYy jj755VxO71EMZLj4Nu5WqRXhgrKhSWTj2eAvUMKUGH2WCzb0Cj2R6JB04BiASrQK TRBnNQFg1MenjN5CTuymgPONNVoVuzCoKbHyUxcAJX6BDa/12w1dNnrIk0W75HhM iIIcgg== Received: from mail-dy1-f197.google.com (mail-dy1-f197.google.com [74.125.82.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4j9enx0cvf-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 30 Nov 2026 20:34:20 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-386a0f79047so12040143eec.1 for ; Mon, 30 Nov 2026 12:34:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796070860; x=1796675660; 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=q24Phj0GWHpSZjUhO6iKVcXLmoRgiIVRx4j9lCa5JvQ=; b=KxBfL+WuEGiTdPfvE4U1vLm1d5epxlDLNjGDLgHdOhnwTZOWOo+p5aKg+j0HJ1sTs8 MG81mQXB9OJ2olE39U969+7Uyh38dZAFIbVDOWIae0i3VGgHyV0CFlqzdg9aj9ecLbrD SRCfMxNT2WxsTX/+7biP0JJqbUxmJaV+vtB91QKURUMdFgcvCN4yA2ye89934qWj3GAx A0UucFXcglcJR4iXLIxGbZ+E8rCnK9p+UK/QokveAH25J0CmeXskrXGOtDAM3NjFWaID MzaT8FC6eqqa5zEU7OxdQ1BsgOftU1uMhv3LJoX/G0dy3J2UjOcH8Wa8TrJMBdSFt1zv dFzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796070860; x=1796675660; 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=q24Phj0GWHpSZjUhO6iKVcXLmoRgiIVRx4j9lCa5JvQ=; b=sIWXXwsOU+wD5IFqYTnCxwM6j/+OiGMnKhBFkbZAqOifkWSgAI6Ft5SpepHAAiEg0O B+/A74EyAb606PMYztQweWaBebg/JtNN5fqlefUvbV9Jo0GbLngKODu++F8eZCY5C4XR 4eYNFwpJAJ9wXC85tfnVYdQMlKbUx+OhoDgmBFn2+EdK8Y/FohktgmPZmwxaXoTTjoDg 73zZquipWy+dp8YYfquaDHUvNjyjTquBbPUr3z0wOfU7+reQ3CPez9iMicXV1TSDQgtZ FrMGtn2Rso0QlMAVSOQXrqW57xXgYsM8TYGLfQBG5XiMKvBP6o2UwZr19/BT21Ba2nk7 hXRQ== X-Forwarded-Encrypted: i=1; AL+hErF79BPbwbsMzhanMFrKClikpillrM2+JHCOlVtQvVBynC/Uyd/bpXWZYv6A9gKbWbzGVjsA1l3y0eR6@nongnu.org X-Gm-Message-State: APuU4Z9Z5jIbGKdahAqjMtG+zGBNytu/jDRoAV//TqsuFP0SNXDdHmcL vQRXQdRjSQomUN8qBaB5zgxu/j7TsHpsLrESedWfI0F0FM33rpiLuThlltlqNjabmKjjXRyXjG8 lILzs2AC6IeGGIWIjbGl6XK1Q0trVbU/VeVTo0yMJPB/Cf9dOrRpfa2TMGQ== X-Gm-Gg: AZFdTZf+UIXDCQri0M8xIq1bjZx3Zz37VgMXAlfYXMAm21pbqjc9IvVc9G0bafo4UM8 4WVLSAOxHty5IOsAVivIjeuNN3hA7sdhhVDjmKMVmwv1Qxr7jU8BK6JltwDVQnGUtflAJufEYha cRNs+lYmzu6djceyLefr7k+synFOmbeV5Fa1pq98JeYJammqoZ5vl0gpBnpBcMgvczYu7hZ+7/Q QNb/+sOtv4kgy+h3zmHancIeZt+gkTN7tJWQjWSa1syhid1BuY4B4uKJ0NFXoR3UBY6C4fwfgeD 0rVcHZLCgzWP7p5wm0cYyG8ujHwTtsuE3GJi7XeYDILSTZSkBXsEg9SIadYLImNN7S6yIpdspxq 6X9PyXvTnDZFR1zKFvojKfwVJyOL2Dc+fkJ5DdHfXUnFQT5eLuMlPOAPfHTfr8awLjTLkrVHC03 XZu4Q2rq5et9zqYNuKA39jgyHjgYOWTRPWlB7i+/s1RiM= X-Received: by 2002:a05:7300:ac82:b0:385:4b9:18f2 with SMTP id 5a478bee46e88-3857093f077mr49602522eec.21.1796070859918; Mon, 30 Nov 2026 12:34:19 -0800 (PST) X-Received: by 2002:a05:7300:ac82:b0:385:4b9:18f2 with SMTP id 5a478bee46e88-3857093f077mr49602455eec.21.1796070859188; Mon, 30 Nov 2026 12:34:19 -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 5a478bee46e88-38567cafec4sm114596751eec.26.2026.11.30.12.34.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Nov 2026 12:34:18 -0800 (PST) Message-ID: <6dc1341f-5c1b-4e81-8ec4-a3c522f76980@oss.qualcomm.com> Date: Mon, 30 Nov 2026 12:34:16 -0800 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/4] scripts/tests: add regen-reference.sh To: =?UTF-8?Q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Cc: =?UTF-8?Q?Daniel_P=2E_Berrang=C3=A9?= , Yoshinori Sato , Liu Zhiwei , qemu-s390x@nongnu.org, Aleksandar Rikalo , David Hildenbrand , Laurent Vivier , Song Gao <17746591750@163.com>, Jiaxun Yang , =?UTF-8?Q?Marc-Andr=C3=A9_Lureau?= , Peter Maydell , =?UTF-8?Q?Philippe_Mathieu-Daud=C3=A9?= , Xianglai Li , qemu-riscv@nongnu.org, qemu-arm@nongnu.org, Daniel Henrique Barboza , qemu-ppc@nongnu.org, Brian Cain , Nicholas Piggin , Ilya Leoshkevich , Alistair Francis , Helge Deller , Weiwei Li , Richard Henderson , Aurelien Jarno , Chao Liu , Palmer Dabbelt , Stafford Horne , Glenn Miles , Harsh Prateek Bora , Chinmay Rath , Paolo Bonzini , Bibo Mao References: <20261130201623.159433-1-alex.bennee@linaro.org> <20261130201623.159433-3-alex.bennee@linaro.org> From: Pierrick Bouvier Content-Language: en-US In-Reply-To: <20261130201623.159433-3-alex.bennee@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Authority-Analysis: v=2.4 cv=Lv0HWXdc c=1 sm=1 tr=0 ts=6b0dddcc cx=c_pps a=Uww141gWH0fZj/3QKPojxA==:117 a=9852oil1ID9t5xBSyQ/BEA==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=KKAkSRfTAAAA:8 a=KmATSGYdu4qzK8C9ON8A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PxkB5W3o20Ba91AHUih5:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: 3N4DrRpOwPYFlSSLcoQVDdU7hhp8rMFj X-Proofpoint-GUID: 3N4DrRpOwPYFlSSLcoQVDdU7hhp8rMFj X-Proofpoint-Spam-Info: AW1haW4tMjYxMTMwMDA4MSBTYWx0ZWRfX9R6cKQWMoG48 Ug3gaRGlsFyC4aMAaZm763PTayKAfMT53iu/0JHI9h9qWdKkpumhEtSrMz4JY12gbIsSu9U4Erx nrof6PFBOhNTJz5COBswJ04XuikAYqs= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTMwMDA4MSBTYWx0ZWRfXxyhuZ8JP46aw 1kr5Xp46TbzlAMwdeMgmkIUJzegM7l2/MYWCOcpnfLoTF7RvNW60SRGdNX4fV1U3AzWeiLOqeq1 4In9H28u970Yggzcd0bc9P4GaW1LZ+kuMJ0q9Taxj0edUFKI+rtZAlOiw5ABccny0FBSzYKluFk XeW55lpjUM36n//iFHc2mTKetI9wdINc5I389GeSWJp9pqyblrNRTyva6iaK0/ogOuhTwGIRjmr TbFYtU1yTNhiWkCtmDUqp3tE721bnuNDnXWRE1XNmlrvuM3w4/RLDgBV1MkPtOhYhUHkOU5TBuU ozsRJ0mtHjRyHL6HDzc4rnALhaN/Cwu74ZGq7ETzhhXVMjrWOUGkOOPFr/zY1PUzZ//+Ym0EU8r 1NVsGmDLO5iLhyMMUGgmen2A98E9brng/ubSvIikYHXGpII8HRQZ8gpB4Oem5QDvuEvDsC5lLP8 TeTpFSW5fugRFaH/IXw== 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-11-30_05,2026-11-30_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 phishscore=0 bulkscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 spamscore=0 clxscore=1015 impostorscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611300081 Received-SPF: pass client-ip=205.220.168.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0a-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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-riscv@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-riscv-bounces+qemu-riscv=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 11/30/2026 12:16 PM, 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 > --- > scripts/tests/regen-reference.sh | 87 ++++++++++++++++++++++++++++++ > tests/tcg/mips64/float_madds.ref | 64 ++++++++++++++++++++++ > tests/tcg/mips64el/float_madds.ref | 64 ++++++++++++++++++++++ > tests/tcg/mipsel/float_madds.ref | 64 ++++++++++++++++++++++ > tests/tcg/or1k/float_madds.ref | 16 ++++++ > tests/tcg/ppc64/float_madds.ref | 64 ++++++++++++++++++++++ > tests/tcg/riscv64/float_madds.ref | 64 ++++++++++++++++++++++ Seems like refs update belong to next commit. > 7 files changed, 423 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 Good idea. Let's make it simpler: - rename it regen-float-references.sh - no arguments (always cover all the tests available) - always rebuild by default (ninja tcg-tests) to make sure everything is up to date This way it's bulletproof and impossible to miss anything. Regards, Pierrick