Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2482337rwi; Tue, 1 Nov 2022 08:11:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7x+o0/NTxC3rT9kkd+27FsjmXpjFA5C3JrpQCtlE2OZhu9hOX6fROCC9KzjgvWg/8P3IA5 X-Received: by 2002:a17:902:e80a:b0:187:3a52:d24e with SMTP id u10-20020a170902e80a00b001873a52d24emr2931406plg.171.1667315502890; Tue, 01 Nov 2022 08:11:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667315502; cv=none; d=google.com; s=arc-20160816; b=j5Gv9BZrSNl7y3OFGil4DDW8WzF46SnPHTFUry+SLXCCu+3JDd08iIlFO5zGr99VzD wAoNoQ661hsggk5UPutj7Z0xZoiDBBYJtlelV9+tWhc5bWKyh6oAV/AQl48bBWlKJYWX tNG9KbEEm84+guuNWday31IUyFmal8+GkNDzvNP92XjRBJSYIHgKXZCaygnlm29k+bk3 Y6w/z099JJacMAg8rHwEcI4wOPz/J6LF8JeHc2YfcJumyIHTrfuN/LCYnsIO1NnaOKjX TqFz0m+UkOeytbJjNJd1Ck8o3CF7HrWve7EmIRxqQ/Il3dcrtOlUf5iA4BMEx3kP8r30 B4Bw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=XkA3q4ZuYl8WiWjg1RJTxK24EJUWKrEDxDZgf18Lv6A=; b=CJiz0GsTbjmvLPWdbbiFfKeA6KmzVNqNi6hryiN0DUwU567P0CGCl0sSR0eOUSh/Bj mxbdnLu83pgWWIVOEQ/q7ZpwlPNdf4fsVh6ne96mJA6dl0G/FHynjDz9Z86PY66TwaeU uHiWesrGqiuydidsig6lzhTEhwUuF3aLt4J0LFpBBi242UNHofHqS956LAxVDpKkx3X1 N6E2LM88PvMTIE1ALK0ooVoM7ZaI1tArTWjHvqPlkpSieYPXZqx2BXHp0jnJ6kIh9Ued xbVFEqlSkwlADpyPeL4zDr6C+/Rzj2zUoy1kjlPJH0FG4AwT4k8RNeG9x7iSFgxSk3JJ 86Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="b/KiuyXk"; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e11-20020a170902cf4b00b00176806795b7si12280744plg.351.2022.11.01.08.11.29; Tue, 01 Nov 2022 08:11:42 -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=@linaro.org header.s=google header.b="b/KiuyXk"; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229939AbiKAOPq (ORCPT + 96 others); Tue, 1 Nov 2022 10:15:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229934AbiKAOPo (ORCPT ); Tue, 1 Nov 2022 10:15:44 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DC8D1A816 for ; Tue, 1 Nov 2022 07:15:43 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id l22-20020a17090a3f1600b00212fbbcfb78so18921340pjc.3 for ; Tue, 01 Nov 2022 07:15:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=XkA3q4ZuYl8WiWjg1RJTxK24EJUWKrEDxDZgf18Lv6A=; b=b/KiuyXkMDrP74iJHD1F+5nOCMt6Gveh9+Sk5OxebU0UKGU7ZEzYtOFsI3W5xrmNnI pCli7OWNBjLug7ILxkoq1MdCU2f8nn65pWDKhBuHFuHWa72NM57O50h+akMf0gn48QGG uvjhAJvrrlXUQhSLIleGv48oBY3KD4+VnVn49izrRLEp9WkujXocGri8YpGhSvFkgY8H F63q/vGDN7+Zpvy9q5EH0U0f/Fk6IAMPtbg5PTcZ2KUbh54eASJSULRExAE+ZCP78ZAD Z3JB4FCZR3O8Zf8ZgXhbrs+1JPKB7aFUxuG5GP8v7mOHSJscnEHsll0aQcdhSZONSLP6 Mhfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XkA3q4ZuYl8WiWjg1RJTxK24EJUWKrEDxDZgf18Lv6A=; b=I29rDC26ScINxesxPN8nw/WSHFXaTHsLKrTieNKzVnMOdRszmfwa7TiENpA5u89WqV Gs762ouGOPRSv+7udtgzVFZurGPH+azKGZPiRix+azrDQEozdDuMjk9Uyk5EQ5V/rv5X ix6Rq0KRtQFKMkKvq9ks/uZzcqNMtlPH+w5JPWx9RpCOUryDiTt17OnjLD3NDh4vlPV4 UuiBpfJuvcgjKUBENy0ZE/F6ay6ESb/PmD8+bme7qdAqtPXyeAP9WKPmy5xn7nozCps9 f2s07j+gFvA7vsvXKhyzPaiDNbUQTgMCw1mNndMsIihZb7y4bS6C2T1HLOeVSCGjOPaV Ycsw== X-Gm-Message-State: ACrzQf2n/6dnFDk2dOFt1w+d2tt7sVDFCGgA4YU83Zsc0cUxlTifeCeD HezR30sFFm/HVcHmaxDXZyOv X-Received: by 2002:a17:90b:1950:b0:212:de19:b3ce with SMTP id nk16-20020a17090b195000b00212de19b3cemr20040323pjb.16.1667312142940; Tue, 01 Nov 2022 07:15:42 -0700 (PDT) Received: from thinkpad ([117.193.209.178]) by smtp.gmail.com with ESMTPSA id d14-20020a170902654e00b0018157b415dbsm6429387pln.63.2022.11.01.07.15.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 07:15:41 -0700 (PDT) Date: Tue, 1 Nov 2022 19:45:34 +0530 From: Manivannan Sadhasivam To: Greg KH 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: <20221101141534.GQ54667@thinkpad> References: <20220824123010.51763-1-manivannan.sadhasivam@linaro.org> <20220824123010.51763-3-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_WEB,SPF_HELO_NONE,SPF_PASS autolearn=no 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 02:44:06PM +0200, Greg KH wrote: > 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. > Sorry to revive this two months old thread. Adapting to TAP output rules requires this test to be moved to KUnit which is strictly not necessary and can be done later. Moreover, I do not have the hardware to run this testcase and I don't feel comfortable moving this to KUnit without doing functional testing. So for now, I will fix the return value of IOCTLs which is the real motive behind this series. Thanks, Mani > thanks, > > greg k-h -- மணிவண்ணன் சதாசிவம்