Message ID | 20240131130859.14968-1-rnsastry@linux.ibm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-46466-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1875416dyb; Wed, 31 Jan 2024 05:10:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IGBf4KiEWQdLOuH1GnbLp6gblpxB3pzlu1dNpgVdhOndh3wNNZs9gg4m4pjEf7TguDJyGL6 X-Received: by 2002:ac8:5ac6:0:b0:42b:eae2:1c45 with SMTP id d6-20020ac85ac6000000b0042beae21c45mr1534046qtd.26.1706706611787; Wed, 31 Jan 2024 05:10:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706706611; cv=pass; d=google.com; s=arc-20160816; b=Y1XuPZ7+0RSDfm0CiwTSY0+A/GZGq1GgpwqNJLdqAffaxELMeiew3MOHpRbCnzeSpw SgHNH9WK1hHLkT+OCsLDkjPcJOoPHMW3RgAZlVpynZfyzrDAhaxBWBm7sMOOxJ1nf5vT 5uEyUCumE/XVk+CONHreX2QsLlTnX40Nl79oO/tgPZheKXSnmUvu9UwNDLPkFcmIqIdq Ag4MqXSDL6Rdz2qT51M2Mgp8O4sGX81eNqD6a3vSBlkkQj248p7yu6abbNhOeptfb9wg ooY78xsVQQaIe5OnR4qgDSCr2t1/XVkBLXjO+2MzO14gAaH/EWBt6uNkTXMjToWehJum lqpA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=yjp8mNUxahTgn7kvuM/IVGuQ/zwU7B9XzbCPNzk19Eg=; fh=VUIDS7saKwNjUqqtNOiXS6xyeJYsN0Gt6TusguPhsu0=; b=foNwA/oFLs8qB+GyWyWsW1hQB4kEvKhNgv28q3ZLWMO/jP6OpbUOLo03Ko8RqAAOy8 /XuBShPSlJRQpqGbbY9fU6bdNCr4ZEttKoHt1qKoQY6dQ8fdmiwMz/jE7rsxaLuJwQ7V lzANx13uxREBeFlu88/Nzk1B9hIYJ6vC4Fu4CIVGkw5chKHZFFUYUuOiOGIYLcvE2rCd epmrGIzVhR37A2bQMViOKH+unaJIc0ZN3MmoRpBEw8i34IJ6JKir+7dOMZs2mC8cU9SZ e6Z9Sj16xXeVBvl2CnFfrsuTiMkmyb621u0GzgOrmb3bxVvRBn+zSHeeH7Sq/1XSZA73 xnEw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=F4JoE4Mw; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-46466-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46466-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com X-Forwarded-Encrypted: i=1; AJvYcCWKKyIHeWjQnXUZl/xRqdknkYBpAkdgvkrYF+zC7iK196YCkiRQlcOf2HW6pSnErn5RjkpyuM2NEXq5iRfwxW75ZhSm9w== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u2-20020a05622a010200b0042ae3ac8fb7si3198797qtw.286.2024.01.31.05.10.11 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 05:10:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46466-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=F4JoE4Mw; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-46466-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46466-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 378EE1C20E2C for <ouuuleilei@gmail.com>; Wed, 31 Jan 2024 13:10:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4FA737D3FA; Wed, 31 Jan 2024 13:09:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="F4JoE4Mw" Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A8357D3EE; Wed, 31 Jan 2024 13:09:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706706569; cv=none; b=nwsknHDWBAd32YgIWjJwzO0IbPpszwXsFafeua4t1kTquPryoGMPMdWsu0X1bbpQKcIAzBIabxkSwirKx/Nm7tIgnthMeukpy6FM9lEJb7AFTQdJmK3M6ighmI91npGo3D+0iKVT81WvGwZyR4rsXDKl/SQDc7IUkLwIuQ/lx5k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706706569; c=relaxed/simple; bh=ProXTEbb42WMrODS82z2i95OCR1gKnbNsh8jOLrnuI4=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=E6Er3JgJTYSYDbinuMYT7P7YnBHmG15rWg9zubLXf9hmi1d8DxdHOKxSEd1TJwI9JuurP4XW515ZhQ2gx6guucjKvg0cpKQT8SQJ3oZDOLOWR+oo69dVFmkXc/h7uzbDJpuBvMvMBjAWMAJfyPZJwqEfKWuPp+aNIYvQwqnfOhU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=F4JoE4Mw; arc=none smtp.client-ip=148.163.158.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 40VBaYgi008037; Wed, 31 Jan 2024 13:09:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=yjp8mNUxahTgn7kvuM/IVGuQ/zwU7B9XzbCPNzk19Eg=; b=F4JoE4MwRCfUiFU3YlVQ97KGcnfQuzeuXkErfTrzFLHktQhbu7xnQZzC+iLG7xaCmBci 4gZ0aJioZKFbWcJ28UNKCHzKJZFvdGnNt3QG+l6+MgGNlpHQ6uME9s07l/3/o6Q1aK8m tM9EMDkr6lA4P/wa8g1Dyu28ac2ikVqm4LffRpezFnOUiOWwxOOJtjpxYKaLp04JL727 WIxg3Q7B+rVv0shQE2nW44Fyexiv7iUQtRcjEUHzUf5uvd3mdpMFiDuz5AF8hSOBb/bU NVRQ5HqGn4ewhqdeJKKLGXQFCljbMRWIwOPuXWkTwjMH0GQ4YhSQoc+Q3oZ1D2Vg2FgO YA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3vymu839k0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Jan 2024 13:09:09 +0000 Received: from m0353722.ppops.net (m0353722.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 40VCU6k0023273; Wed, 31 Jan 2024 13:09:09 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3vymu839jh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Jan 2024 13:09:08 +0000 Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 40VC5pqg008234; Wed, 31 Jan 2024 13:09:08 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3vwdnm5cpd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Jan 2024 13:09:08 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 40VD94An57147712 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 31 Jan 2024 13:09:04 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B51B82004E; Wed, 31 Jan 2024 13:09:04 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E4FE020067; Wed, 31 Jan 2024 13:09:02 +0000 (GMT) Received: from localhost.localdomain (unknown [9.43.59.95]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 31 Jan 2024 13:09:02 +0000 (GMT) From: R Nageswara Sastry <rnsastry@linux.ibm.com> To: linux-kselftest@vger.kernel.org, shuah@kernel.org, skhan@linuxfoundation.org, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, nathanl@linux.ibm.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Cc: rnsastry@linux.ibm.com Subject: [PATCH] papr_vpd.c: calling devfd before get_system_loc_code Date: Wed, 31 Jan 2024 18:38:59 +0530 Message-Id: <20240131130859.14968-1-rnsastry@linux.ibm.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: of0iIm6w8rYeDF7JcWbHIF16Z7Rixjyh X-Proofpoint-ORIG-GUID: O83hNWb-4by3EyM9cdH9oufTUYtX3KgY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-31_06,2024-01-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 adultscore=0 malwarescore=0 suspectscore=0 mlxlogscore=999 bulkscore=0 phishscore=0 impostorscore=0 mlxscore=0 lowpriorityscore=0 spamscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2401310100 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789611592576272814 X-GMAIL-MSGID: 1789611592576272814 |
Series |
papr_vpd.c: calling devfd before get_system_loc_code
|
|
Commit Message
R Nageswara Sastry
Jan. 31, 2024, 1:08 p.m. UTC
Calling get_system_loc_code before checking devfd and errno - fails the test
when the device is not available, expected a SKIP.
Change the order of 'SKIP_IF_MSG' correctly SKIP when the /dev/papr-vpd device
is not available.
with out patch: Test FAILED on line 271
with patch: [SKIP] Test skipped on line 266: /dev/papr-vpd not present
Signed-off-by: R Nageswara Sastry <rnsastry@linux.ibm.com>
---
tools/testing/selftests/powerpc/papr_vpd/papr_vpd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Wed, 31 Jan 2024 18:38:59 +0530, R Nageswara Sastry wrote: > Calling get_system_loc_code before checking devfd and errno - fails the test > when the device is not available, expected a SKIP. > Change the order of 'SKIP_IF_MSG' correctly SKIP when the /dev/papr-vpd device > is not available. > > with out patch: Test FAILED on line 271 > with patch: [SKIP] Test skipped on line 266: /dev/papr-vpd not present > > [...] Applied to powerpc/fixes. [1/1] papr_vpd.c: calling devfd before get_system_loc_code https://git.kernel.org/powerpc/c/f09696279b5dd1770a3de2e062f1c5d1449213ff cheers
diff --git a/tools/testing/selftests/powerpc/papr_vpd/papr_vpd.c b/tools/testing/selftests/powerpc/papr_vpd/papr_vpd.c index 98cbb9109ee6..505294da1b9f 100644 --- a/tools/testing/selftests/powerpc/papr_vpd/papr_vpd.c +++ b/tools/testing/selftests/powerpc/papr_vpd/papr_vpd.c @@ -263,10 +263,10 @@ static int papr_vpd_system_loc_code(void) off_t size; int fd; - SKIP_IF_MSG(get_system_loc_code(&lc), - "Cannot determine system location code"); SKIP_IF_MSG(devfd < 0 && errno == ENOENT, DEVPATH " not present"); + SKIP_IF_MSG(get_system_loc_code(&lc), + "Cannot determine system location code"); FAIL_IF(devfd < 0);