From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.180.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796267278; b=2a5O4l+7DBrHTf/99eccCADHmdazEuE8F8ZksXhWUEJZADayjVZQcBUX1IFZ7x7ev820 pd/D0/DiVCnyWLEZRBwi0t1mjrEpC1B67Lrc0YL1hJGFWQ5kR8b9S6iCDiHv5jFn4OU6k Hty/dRxSf6N1tTpHecFtQzIDilnbUuhicgLBXi7bVvY77fPn0+QKnVmEYoXJ7Q7hBmUO+ g6vtKkhKMbaun2hN1RhSTy3JNltG2rOmF3orOj/bpzqTRq9Z+MnFei1gph3MTFo+MvLvF VbjeaNUng2awO/A33VQryE+mQgp2OWYzOXHxDu0eBpr2/gKdfH3bYFZiwscqw5bmQZg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796267278; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:Message-ID: Date:MIME-Version:User-Agent:Subject:To:Cc:References: Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:X-Proofpoint-Spam-Info: X-Proofpoint-Spam-Details-Enc:X-Proofpoint-ORIG-GUID: X-Proofpoint-GUID:X-Authority-Analysis:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=vkvekW0313x0Da4t57a0uvUhIeEN27yAhBT023/x4+w=; b=SkuR/Ib/VkBouYJL807rXjJjNstlq23Mta2cCbr7fgFpqVBecD7E5SYCvPqVDn70Vx75 RjasHjgkf+zGtcqeNppvSiC44fZZCEBLO1ViBoS9jYm2pPcFIdWGXFL0UjX14Sa5hBHU5 sT0W/wEgNKIvrGa6NfT9UJ78Kh8IAE8fRnae8ZTDY6jvv1dfJcm0F4rYiRsP8h8j+Wqwx zxcSfVar+jxvE+J4as8r1Bc+Q9cRlwh30ZiGIDL+wG0M4mewi5p2zVqdFBMU5OsIQfWYi A2ouwjc1JUMn1vEeTn0aJWGoj+aqdrPJVIefr52F6fydBOLYOFoQU2xXjuBLhCUoMMw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=Fj4wxvOK; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=DJMXv0mS; arc=none smtp.remote-ip=205.220.180.131 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 732D5606A322 for ; Thu, 3 Dec 2026 03:07:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 732D5606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com 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=Fj4wxvOK; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=DJMXv0mS Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B336XHk3395575 for ; Thu, 3 Dec 2026 03:07:56 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= vkvekW0313x0Da4t57a0uvUhIeEN27yAhBT023/x4+w=; b=Fj4wxvOKFp9e8tI2 ykITachpTENevJdVY3hOGCl/JvZDKf5+HAd1pY/9LQuR7cKi9ZDwr/svLyrmf1Q3 TwHd9tAhIBgEzxqfiPKvsoU3Aok+EK/nFJ/4G2J15YUnBaYk9YLGN5JrTwF6gX+1 gyMh262Sv3U1Bgz9BavNRyJULwJ1ltu7ccpHajX4gNBpNrxF6zdxb48tvDgfSSbY QrSyoqp501ihx+PHNNFpplYYgppkazoKD+aLWg+6XpjQIwC1W83TjozL/TfpMgEY NrB0NOPaaIDK09Zjr8cnUMmfz/rE3TSWA9fDJ/EnRfab3PDZS+pXF8YhSovOPSEz yUYsGg== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4janr72kah-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 03 Dec 2026 03:07:56 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-3b55745994eso447554a91.0 for ; Wed, 02 Dec 2026 19:07:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796267275; x=1796872075; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=vkvekW0313x0Da4t57a0uvUhIeEN27yAhBT023/x4+w=; b=DJMXv0mSVOw8TffdppYZRQMxD+tJKGgM+TnHLBvHgALZ9E3ikvtd3fgMRK2fxmvWSu gJB1BAoP6DCLxQGldCaSvNRJk6jE1IayYO8I2gG9zaQB8Z+zBZEJACUqRjzRjT5O+94O /UnNaPs6TuDM9n9csMdylcNXLnvwGW+oVSoB5FEof8XZFYOJfpi/3vwRs9jNfuFTk8Jc LLFxxT+/q+xVsL8VQsYlifH9Y6IGmUyaJ/RFHcpnpSs+roUHeUrGeqDdAma5Gq3GiH0V VYEQhxodWFsGYLU4VZc223Da1FBlht+978H/V/gjLg8L8090JqNLAS2HHiZyEDZERhbF Kfaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796267275; x=1796872075; h=content-transfer-encoding:content-type:in-reply-to:from :content-language: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=vkvekW0313x0Da4t57a0uvUhIeEN27yAhBT023/x4+w=; b=qDdqfBFzxzincUz/hlvjWvgdI+w+V//CA+7Bf0ExewlkYHvwKruwxYd6UFAM+mHRS1 PcNFU2tZu4rDU+tteXFwEx6+dmXddmwM0GQsWuRvdlA3SyROPEICNeElg0/Se58pE5iR 2NkemjdplzgdgSMG1vLDLSZmd6xPeCp1SPUBIfZ+gtkg+9ILruY61TCrIfdy0LKDcLhA ffuvQHElOMp7UTtipKdGP2KN+8fNASX7Ksoq6p8i2eemFNS6EtXeBRIkOh6kzphRz/Qd g0VznvTWyiJOiMkz1ZZtqRKyWDVth+lJbCeErAnwrzHf/BGs7H4SQGRJRY4dk2p5Acgn RnCw== X-Forwarded-Encrypted: i=1; AL+hErEEDzalYB0oeySBXsE2pI7nmT4DfOjqGJLOstZHh2akhf263h9prGi2e64bauQSOzLsfc13P6uGIA==@vger.kernel.org X-Gm-Message-State: APuU4Z81/wQ4BJxvYX/mHzq644Qj07CqGk0XPSdziO/E+o0lRKTCqU6u YWq0dOcxpe63F8GIQWlkVUTFEvGObdL8Or7h1+XNLuJtLaD0hkgAPqgGxWBCqp5C/qzbvXC0p4s 6fQnKlM/pVGda0B5a8VP1mWWO8eF5ztoqc+wGTs24V7ceITyQBHYdnc/UvgyX6g== X-Gm-Gg: AZFdTZf39nudQYO+woLwaCA6X/92DFzhriWmaxkcPvW3BG4fldkyirj7Y/pj7R9iQk7 7dpH5vCuF/y7p5YlNpOfrn+SJaDd9KWGMWNddg92s5HvesFTPbcBZza+1PIZQ8ZToAeWtHxk16a QGOkvrMpZg4O1TuIU4sGhUPd24vbWSbrnc0bfs2kFnUEj3Z8Fg93K9xaNna1flFnyC1JkCnGIgf m5x8NAb80znB9lVy99SRLh/xYJlScg3ldYW10yYF+dy4CY84nAybV6RsOdIJnI/mM/4O1vhpyf3 RTGW6yBFcS5DcTSx4Sao1cbAtqw9d1/VRFsAbJpmRGMU080Owyxk8Mdg7RUQT0+mWP+PKQA6AbD xwy6c9WYrWH5TK8/dbQAVIykT/STjlkXEsaNE+E95bKSaA5sLh+VlTlEWzsJEbYgr/iB8lIZLDs gfzG5/lhy8ICMIkeAc9fVeKykwwY+CfaVyNsbKlB8utxo= X-Received: by 2002:a17:90b:4b8b:b0:3b5:32db:11f with SMTP id 98e67ed59e1d1-3b5cb696969mr460588a91.18.1796267274884; Wed, 02 Dec 2026 19:07:54 -0800 (PST) X-Received: by 2002:a17:90b:4b8b:b0:3b5:32db:11f with SMTP id 98e67ed59e1d1-3b5cb696969mr460488a91.18.1796267271202; Wed, 02 Dec 2026 19:07:51 -0800 (PST) Received: from [10.133.33.245] (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b5c799ced0sm1950532a91.15.2026.12.02.19.07.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Dec 2026 19:07:50 -0800 (PST) Message-ID: <9fafe114-88e0-4101-82ee-07d25f9fc0ef@oss.qualcomm.com> Date: Thu, 3 Dec 2026 11:07:46 +0800 X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] selftests: cpufreq: Propagate do_test() exit status To: =?UTF-8?Q?Lo=C3=AFc_Minier?= , "Rafael J. Wysocki" , Viresh Kumar , Shuah Khan , Muhammad Usama Anjum Cc: Shuah Khan , linux-pm@vger.kernel.org, linux-kselftest@vger.kernel.org, Zhongqiu Han References: <20261202-kselftests-cpufreq-exit-status-v1-1-05e9c2a9a075@oss.qualcomm.com> Content-Language: en-US From: Zhongqiu Han In-Reply-To: <20261202-kselftests-cpufreq-exit-status-v1-1-05e9c2a9a075@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAzMDAxMSBTYWx0ZWRfX55P2D0THnG6O GMnF+AGdC83sfwnR9Dzr36FXlO0+8A8H/FYRqCKX6b/nuUGIqVFmKX21NK3roGzai8z1jYMFar+ r4omkGiASQm/M2RttbVduRU5KOKqdqk= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAzMDAxMSBTYWx0ZWRfXwiHIRhhSX0Lk 8CPk9JToA1Fbxir8du0VV6wBELdQeiBeZPoDHmrdHJEsuj5AupBUeIrIJ1+9AAiBeyHuAkKyV00 rIEFFmpfT218ENgDRZ+ffZhe8pWtt6bxrR3SyguEHs9zgHZJ3LaYpM5qEAxB2y9eOpEd9LHsd5T VVPxZOFD55Ldw65+l/NvDIvk7Mqy4Vd7NOHantrnOCO/JH2x8YV7mXmWrD5a7LIGRDqJjWKDtcC lWFRlVwRWLk4oex3HBy2/W68BX8vmXkKsHU3Q6Eme89NLUqJxDypwdCvomzKKfaW5r7iN+Q+fPw q/L/s6VZK9zunDD9Bcea8xG5WvZ+EcVPu00ErjCrdY2K+utUo98uqew5jJ7B5M6LkW+c9GkcOfC iL9/m8TxhRHY30TBUNTK+dE54dgElVYjNgt62PCjD9dTbNFzmTgydhviAv4QkTXbsa3RNLPwHkK UXVLrwQFrKferu6mgRw== X-Proofpoint-ORIG-GUID: sIfB3OxvYLcfpYpNq9JnaYvosaUZmhX1 X-Proofpoint-GUID: sIfB3OxvYLcfpYpNq9JnaYvosaUZmhX1 X-Authority-Analysis: v=2.4 cv=fYY4WEQF c=1 sm=1 tr=0 ts=6b10dd0c cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=oLk3fUOuYHWJuiVI8KAA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 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-03_01,2026-12-02_07,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 impostorscore=0 bulkscore=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 spamscore=0 adultscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612030011 Hi Loic, Thanks a lot for the patch. On 12/3/2026 4:59 AM, Loïc Minier wrote: > main.sh runs do_test through tee and checks ${PIPESTATUS[0]}, but by the > time the "exit ${PIPESTATUS[0]}" in the if body is executed, PIPESTATUS > has already been overwritten by the [ test, so the script exits 0. > > As a result, when do_test() bails out, e.g. with "No cpu is managed by > cpufreq core, exiting", the test is reported as passing: > > # Bail out! No cpu is managed by cpufreq core, exiting > # # Totals: pass:0 fail:0 xfail:0 xpass:0 skip:0 error:0 > ok 1 selftests: cpufreq: main.sh > > This was hit on a Qualcomm Glymur laptop with CONFIG_CPU_FREQ=y but > without CONFIG_ARM_SCMI_CPUFREQ, so no CPU had a cpufreq policy. > > Save the pipeline status before testing it, so that the failure is > reported: > > not ok 1 selftests: cpufreq: main.sh # exit=1 > > Fixes: c7e84706fd3b ("selftests: cpufreq: conform test to TAP") > Signed-off-by: Loïc Minier The fix looks correct to me. However, I think the issue was introduced by commit 40d70d4d6097 ("selftests: cpufreq: Write test output to stdout as well"). Commit c7e84706fd3b ("selftests: cpufreq: conform test to TAP") attempted to fix it by checking PIPESTATUS, but the fix did not work as intended. So the Fixes tag should point to 40d70d4d6097 instead, right? > --- > Tested on a Qualcomm Glymur laptop without CONFIG_ARM_SCMI_CPUFREQ: > the bail-out was reported as "ok 1" before this change and as "not > ok 1 ... # exit=1" after it. > --- > tools/testing/selftests/cpufreq/main.sh | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/tools/testing/selftests/cpufreq/main.sh b/tools/testing/selftests/cpufreq/main.sh > index f12ff7416e41..03163cd7813e 100755 > --- a/tools/testing/selftests/cpufreq/main.sh > +++ b/tools/testing/selftests/cpufreq/main.sh > @@ -207,8 +207,9 @@ prerequisite > # Run requested functions > clear_dumps $OUTFILE > do_test | tee -a $OUTFILE.txt > -if [ "${PIPESTATUS[0]}" -ne 0 ]; then > - exit ${PIPESTATUS[0]}; > +ret=${PIPESTATUS[0]} > +if [ "$ret" -ne 0 ]; then > + exit "$ret" > fi > dmesg_dumps $OUTFILE > > > --- > base-commit: 0df89587a56e0f0392a9d5380334fb87ec4f2690 > change-id: 20261202-kselftests-cpufreq-exit-status-3759fb29842c > > Best regards, > -- > Loïc Minier > > -- Thx and BRs, Zhongqiu Han