Received: by 2002:ab2:f03:0:b0:1ef:ffd0:ce49 with SMTP id i3csp45231lqf; Tue, 26 Mar 2024 13:51:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWeJ5XF0xmLA0yozvTUwEblIL9fTouXgaUwhCAfmX7bqt2wBTibTUCl2UZhO6hUd/VJwQnp5kLTAheDJHznYYLtB+eQqgFdnntxcLnZhA== X-Google-Smtp-Source: AGHT+IG+LyaxGqPDNQ0g4oUzkCzW5T8yFLVhvhGYIZonpZh+4VTeLo9kEf8+9YH2HeBbMGNUECWL X-Received: by 2002:a50:875c:0:b0:568:d315:b85e with SMTP id 28-20020a50875c000000b00568d315b85emr1566817edv.36.1711486312775; Tue, 26 Mar 2024 13:51:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711486312; cv=pass; d=google.com; s=arc-20160816; b=puSv15fduo1v66VA0cE/rHr6ehx1ZFa16ciYWYjzoHbul5YGRc3l4u9DYckBGRbcRr NQ4gg73xi43dyhbJuRWuYaal/ZWCYYzoV9m6wyzD97GHafVZ9EBtrPkUW253UwXwR9cp pCbf8LsbfBrYKg/SjXhtEFdUR7jJcDD5gUZS1riO2pcNZnuElqXLCDIkTycu4Wimy5ZT /6AmCg9s7LLH696hac8i0KVioX0cKb3z8U+USIjUjXeDa0MtCX6sRQxUeXdgz86Ecldc hjw0J+UY2jB8wqNELAIaekI2JNNNlmIl4Cc1qR7/7c7+1WueofWkeG2UPyCXqGlw4bTh LrhA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=iGATlVHZqsOUXgCYm+M0WxHRZxp5uAZbCgkClimc7Og=; fh=3gM3zp2oQEthwL/ONLDrrDOMkRd3I15s5IQIa3/fnpk=; b=mWXT94qayFXKvRo7LQPw6Qg041vTAAGv1P0fDCL8lpAhk0C5pp0l5SZlArjEmyp7m3 PUDdgLjl7w2RTeKgg8BDhY3xq64lweT/tVagbVPXKCjLRJKwmsxPxiB5OgNG+DHqhtwc KG6PToFTPRXJC8IMMqjIBg9ZRqtT5AtCMf10yWuwDlO4+/qpNqXksFy+M4lUieP8F8+V uhtLHQRvd31hzHxWKzwz/KDfVPsnEsIuGZQUsfudp9TQcIWOBf7VZt9+5C9bv66R7nUu xTrNNEMDBiCW232H6sJ4CbMeKRUa53jnXbSpNzcd9BBl98iLNTZ3S1KNwYqAJr8LUWQA QWNA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=b6G4NyNI; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linuxfoundation.org dmarc=pass fromdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-119958-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119958-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id m17-20020a056402431100b0056c24617a09si1406826edc.485.2024.03.26.13.51.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 13:51:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-119958-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=b6G4NyNI; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linuxfoundation.org dmarc=pass fromdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-119958-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119958-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 828031F86BA4 for ; Tue, 26 Mar 2024 20:51:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D616E12AAF7; Tue, 26 Mar 2024 20:51:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="b6G4NyNI" Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3015CEDF for ; Tue, 26 Mar 2024 20:51:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711486308; cv=none; b=eBP+EtJmnETP/ATVU2dSdZLwnRu+u2GuRzX1B9abirPFXAlPsJ99CC7MEw78vc0ncuej3Znq4joup2Zn+GhgVuQr73tdfMBEQ3qH3gw50hW6FlHXrVuwUIkKiE7YIKBSdj6ORSQ93fegozY0L26Qrb/Tcs2PBMXxhKOpuYGIZWU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711486308; c=relaxed/simple; bh=hBC772ybdf+Owd0PNC117b7rIoH9nw9Zgk2CSiwxMwE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=qAS+l9rzLXWRUo3T9W7DiKho5DGMyKEmYWMfXda+sRBscVCsh1E+qAw5g9TtgIJqFKjDg6IogISgSTOPLDLHYPnJQZ2OsWIN3j0JGM2qdcGqSRldLzYRgtWIVJIIv1WA5CSqid5FvJIiV2+wxyTHDrx4Z06pXOJ5JMJ8/fUJlTo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=b6G4NyNI; arc=none smtp.client-ip=209.85.166.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-io1-f52.google.com with SMTP id ca18e2360f4ac-7d0772bb5ffso4258239f.0 for ; Tue, 26 Mar 2024 13:51:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1711486306; x=1712091106; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=iGATlVHZqsOUXgCYm+M0WxHRZxp5uAZbCgkClimc7Og=; b=b6G4NyNI759FFivuZ6Fnv2k+NiOpUs5HsMUseoZrjVeDtv+1U+hYRwX8O4c7jXwQwt FSJ3Tz2gE5sLah38IafMVCgPdGyoHnx3Fju7I27PdoN88tsPrBLaeoOMw3e5jl+wsvaL Kqz8o0ORfu48i2z58im20vIvxfoFhbVYrGhms= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711486306; x=1712091106; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=iGATlVHZqsOUXgCYm+M0WxHRZxp5uAZbCgkClimc7Og=; b=jarqjO2h6k6HyK9OU4l4XRzUrZAOuz/W0y4RgmkZ/vX0cpsO3lhHrxU4NAVXOZaB18 rvLUkziEkfFQkT6nx1jnHxZiZxsJ4qv54Vf1aAxFhWR8W21tg2c8KdlR9ZcJIP4ZDWIu 1RMcx2yTfhYWUv+2fQHiRS9EQELg1MtKKsyUAzZ5H6DG2CIPnngGcqL+ZLOivqWW98Re 8mAaM8ohZ7KcS0lAvMCu1UwxS9R2ImypsJK5YFlswowzxsIxW6xTRWCo6tnIBQauH5w2 cZICHfpKScrXqxn2mQD9XquIw+qIOlh9sZzEbwK3sn7AXTXkQOWF4x6xeODhK3A7I5Ek RRYQ== X-Forwarded-Encrypted: i=1; AJvYcCV6gcc8kuDJw0+1iss8NLCCKQuLLDoEFZHnJ9/phz8wvEMm5GrfY6eOQ02q4kaEa19as2Zt2O5Z8q7wZlvLPR2/+aW9NbhZB2tvuLGA X-Gm-Message-State: AOJu0Yxd0ZO8sOh+8GPF5Gg82EQZCJEDZ2gE4EdAplSUa8mbjjLCN3Xp aAaHb/qc26Fz/+lgC5Bh3X4B4mb79oyUiHVPhuLO5sLh09VRy3H7CQVZBM0HfdY= X-Received: by 2002:a6b:c986:0:b0:7d0:3d2c:5987 with SMTP id z128-20020a6bc986000000b007d03d2c5987mr11140257iof.0.1711486306120; Tue, 26 Mar 2024 13:51:46 -0700 (PDT) Received: from [192.168.1.128] ([38.175.170.29]) by smtp.gmail.com with ESMTPSA id y24-20020a02bb18000000b00474dc6544c2sm2886255jan.97.2024.03.26.13.51.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Mar 2024 13:51:45 -0700 (PDT) Message-ID: <9b30d5a7-1a23-4f48-b6c3-4908535a998b@linuxfoundation.org> Date: Tue, 26 Mar 2024 14:51:44 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] selftests: x86: skip the tests if prerequisites aren't fulfilled Content-Language: en-US To: Muhammad Usama Anjum , Shuah Khan , "Kirill A. Shutemov" , "Chang S. Bae" , Dave Hansen , Binbin Wu , "Peter Zijlstra (Intel)" , Weihong Zhang , angquan yu Cc: kernel@collabora.com, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan References: <20240314114502.466806-1-usama.anjum@collabora.com> From: Shuah Khan In-Reply-To: <20240314114502.466806-1-usama.anjum@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 3/14/24 05:44, Muhammad Usama Anjum wrote: > Skip instead of failing when prerequisite conditions aren't fulfilled, > such as invalid xstate values etc. This patch would make the tests show > as skip when run by: > make -C tools/testing/selftests/ TARGETS=x86 run_tests > > ... > # timeout set to 45 > # selftests: x86: amx_64 > # # xstate cpuid: invalid tile data size/offset: 0/0 > ok 42 selftests: x86: amx_64 # SKIP > # timeout set to 45 > # selftests: x86: lam_64 > # # Unsupported LAM feature! > ok 43 selftests: x86: lam_64 # SKIP > ... > > Cc: Chang S. Bae > Acked-by: Kirill A. Shutemov > Reviewed-by: Binbin Wu > Signed-off-by: Muhammad Usama Anjum > --- > Changes since v1: > - Use arch_prctl to check if amx is supported This should be mentioned in the changelog and also show that there are bo backwards compatibility issues. > --- > tools/testing/selftests/x86/amx.c | 27 ++++++++++----------------- > tools/testing/selftests/x86/lam.c | 2 +- > 2 files changed, 11 insertions(+), 18 deletions(-) > > diff --git a/tools/testing/selftests/x86/amx.c b/tools/testing/selftests/x86/amx.c > index d884fd69dd510..95aad6d8849be 100644 > --- a/tools/testing/selftests/x86/amx.c > +++ b/tools/testing/selftests/x86/amx.c > @@ -103,21 +103,6 @@ static void clearhandler(int sig) > > #define CPUID_LEAF1_ECX_XSAVE_MASK (1 << 26) > #define CPUID_LEAF1_ECX_OSXSAVE_MASK (1 << 27) > -static inline void check_cpuid_xsave(void) > -{ > - uint32_t eax, ebx, ecx, edx; > - > - /* > - * CPUID.1:ECX.XSAVE[bit 26] enumerates general > - * support for the XSAVE feature set, including > - * XGETBV. > - */ > - __cpuid_count(1, 0, eax, ebx, ecx, edx); > - if (!(ecx & CPUID_LEAF1_ECX_XSAVE_MASK)) > - fatal_error("cpuid: no CPU xsave support"); > - if (!(ecx & CPUID_LEAF1_ECX_OSXSAVE_MASK)) > - fatal_error("cpuid: no OS xsave support"); > -} > Why doesn't the changelog mention the code removal? thanks, -- Shuah