linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Greg KH <gregkh@linuxfoundation.org>
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
Date: Tue, 1 Nov 2022 19:45:34 +0530	[thread overview]
Message-ID: <20221101141534.GQ54667@thinkpad> (raw)
In-Reply-To: <YwYdFt6sc7lZGRcg@kroah.com>

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 <manivannan.sadhasivam@linaro.org>
> > ---
> >  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

-- 
மணிவண்ணன் சதாசிவம்

  parent reply	other threads:[~2022-11-01 14:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24 12:30 [PATCH v2 0/5] pci_endpoint_test: Fix the return value of IOCTLs Manivannan Sadhasivam
2022-08-24 12:30 ` [PATCH v2 1/5] misc: pci_endpoint_test: Fix the return value of IOCTL Manivannan Sadhasivam
2022-08-24 12:43   ` Greg KH
2022-08-24 14:25     ` Manivannan Sadhasivam
2022-08-24 12:30 ` [PATCH v2 2/5] tools: PCI: Fix parsing the return value of IOCTLs Manivannan Sadhasivam
2022-08-24 12:44   ` Greg KH
2022-08-24 14:28     ` Manivannan Sadhasivam
2022-11-01 14:15     ` Manivannan Sadhasivam [this message]
2022-11-01 17:11       ` Greg KH
2022-08-24 12:30 ` [PATCH v2 3/5] Documentation: PCI: endpoint: Use the correct return value of pcitest.sh Manivannan Sadhasivam
2022-08-24 12:30 ` [PATCH v2 4/5] misc: pci_endpoint_test: Remove unnecessary WARN_ON Manivannan Sadhasivam
2022-08-24 12:30 ` [PATCH v2 5/5] tools: PCI: Fix memory leak Manivannan Sadhasivam
2022-09-09 13:09 ` [PATCH v2 0/5] pci_endpoint_test: Fix the return value of IOCTLs Lorenzo Pieralisi
2022-11-01 14:03   ` Manivannan Sadhasivam
2024-08-02 11:44 ` [PATCH v2 1/5] misc: pci_endpoint_test: Fix the return value of IOCTL Hrishikesh Deleep

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221101141534.GQ54667@thinkpad \
    --to=manivannan.sadhasivam@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kishon@ti.com \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mie@igel.co.jp \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).