All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.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 18:11:52 +0100	[thread overview]
Message-ID: <Y2FTWLw0tKuZ9Cdl@kroah.com> (raw)
In-Reply-To: <20221101141534.GQ54667@thinkpad>

On Tue, Nov 01, 2022 at 07:45:34PM +0530, Manivannan Sadhasivam wrote:
> 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.

KUint has nothing to do with TAP output.  TAP output is what the
framework in tools/testing/selftests/ wants to see.  Why not move this
test into the proper location there and not in an odd location like
tools/pci/?  It does not belong in tools/pci/ at all.

thanks,

greg k-h

  reply	other threads:[~2022-11-01 17:11 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
2024-08-02 11:44   ` Hrishikesh Deleep
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
2022-11-01 17:11       ` Greg KH [this message]
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

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=Y2FTWLw0tKuZ9Cdl@kroah.com \
    --to=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=manivannan.sadhasivam@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.