Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp561820rwe; Wed, 24 Aug 2022 05:49:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR5voEb3tHq0g7LtGcz/6VdCKCM9tep89X6FPUzqzXObyaL9kVPgtCwj4V/JcLyeHEhOgle6 X-Received: by 2002:a05:6402:4407:b0:447:1026:7537 with SMTP id y7-20020a056402440700b0044710267537mr7077912eda.312.1661345363861; Wed, 24 Aug 2022 05:49:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661345363; cv=none; d=google.com; s=arc-20160816; b=p5aSJIE3M1WNjnSEne9FgspwPIA7eOrUxOwGg7pxrcx3RovFAPpK8CoOdoLarGSBY4 ctH1+kBjklbtRUgrusaU0USUbkeJ6GIeN5XaZxGPj4Gb3EQbNtnDwr0vClYULVaeRtf4 zHfNBng6ESibDiEi7Z+r00c2cxL5QSfOhWMGiG6n59nKhHq+2KC9qS464N3aMQjQi2dn XGv+PTc4zuzEnCWQR5GgGZA3C2A3SlOplHsLHnRnU/r6QnhzD0H6Ipz2+xaiMF+QoRYh 8KuftRV4RhPOHa1Uo/j8+RKzaLAN0i/ChQhiCYgXQcRawA+Vn68eTObjOTef4Zg8jco/ RanQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=X9FKn5XXi5ZH12Op6GpIIOWwUefhD9lRrXXe/4BVmvo=; b=Cfedqm7V6fiLwHIgxuMZjim/Fsp4oXw+F8ShbEEpDUvRdpYEsFPFsU1hvPTTD1XLnT 9SJxkzS6RzN2ZuX02a/cbeXd8tcHS4lTjF4Vvee0EdVXKAD7I2olbdZAzX8HW+QRpPq0 n95qJFiKsRgVI5X66q21MzayoTE/vHSoo4XeZx9p90J+Gu5ec7LOKnFVEBhAkEZPyZxD egTWK+K3xmXV31J9q6na2qNHSXf+sMJoW9pSeseWZ9I6pMHt3IjvHPBEgP/clLSwfGIR kf9svbz281lHzFIcrwpI15K8Ujk4MlVzVB9tMCW3Vhl8auc+l5ZMCR04wFeRnyO2BugO xl9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LZKILxcG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb20-20020a170907961400b0073d685b6497si2383371ejc.750.2022.08.24.05.48.57; Wed, 24 Aug 2022 05:49:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LZKILxcG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237172AbiHXMoP (ORCPT + 99 others); Wed, 24 Aug 2022 08:44:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234401AbiHXMoN (ORCPT ); Wed, 24 Aug 2022 08:44:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83A787EFD9; Wed, 24 Aug 2022 05:44:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3ED39B823EE; Wed, 24 Aug 2022 12:44:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40A92C433D6; Wed, 24 Aug 2022 12:44:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661345049; bh=VyOSeotGuBynCWf8xVV1neByhcDavvdhIyVzJYpBTTw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LZKILxcGZ1yzoQ3CKhg+sqa4gxpeyzquI4CmEXkcU2sI59dGBNd7AbruZCP+VS71w 7NplD7UX8s9eFmYY1JAD6C7GFVE3gwYjp52vfwuYk+UM9mV+NSCyqBtS0paFBGw8k6 vp1cdjF+ttL6NF/niJPVKeJI02tbtuJ9ohbLqdGE= Date: Wed, 24 Aug 2022 14:44:06 +0200 From: Greg KH To: Manivannan Sadhasivam Cc: kishon@ti.com, lpieralisi@kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, mie@igel.co.jp, kw@linux.com, stable@vger.kernel.org Subject: Re: [PATCH v2 2/5] tools: PCI: Fix parsing the return value of IOCTLs Message-ID: References: <20220824123010.51763-1-manivannan.sadhasivam@linaro.org> <20220824123010.51763-3-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220824123010.51763-3-manivannan.sadhasivam@linaro.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 24, 2022 at 06:00:07PM +0530, Manivannan Sadhasivam wrote: > "pci_endpoint_test" driver now returns 0 for success and negative error > code for failure. So adapt to the change by reporting FAILURE if the > return value is < 0, and SUCCESS otherwise. > > Cc: stable@vger.kernel.org #5.10 > Fixes: 3f2ed8134834 ("tools: PCI: Add a userspace tool to test PCI endpoint") > Signed-off-by: Manivannan Sadhasivam > --- > tools/pci/pcitest.c | 41 +++++++++++++++++++++-------------------- > 1 file changed, 21 insertions(+), 20 deletions(-) > > diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c > index 441b54234635..a4e5b17cc3b5 100644 > --- a/tools/pci/pcitest.c > +++ b/tools/pci/pcitest.c > @@ -18,7 +18,6 @@ > > #define BILLION 1E9 > > -static char *result[] = { "NOT OKAY", "OKAY" }; > static char *irq[] = { "LEGACY", "MSI", "MSI-X" }; > > struct pci_test { > @@ -54,9 +53,9 @@ static int run_test(struct pci_test *test) > ret = ioctl(fd, PCITEST_BAR, test->barnum); > fprintf(stdout, "BAR%d:\t\t", test->barnum); > if (ret < 0) > - fprintf(stdout, "TEST FAILED\n"); > + fprintf(stdout, "FAILED\n"); > else > - fprintf(stdout, "%s\n", result[ret]); > + fprintf(stdout, "SUCCESS\n"); Is this following the kernel TAP output rules? If not, why not? If so, say that you are fixing that issue up in the changelog text. thanks, greg k-h