lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 1 Nov 2022 18:11:52 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Cc:     kishon@...com, lpieralisi@...nel.org, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org, mie@...l.co.jp, kw@...ux.com,
        stable@...r.kernel.org
Subject: Re: [PATCH v2 2/5] tools: PCI: Fix parsing the return value of IOCTLs

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@...r.kernel.org #5.10
> > > Fixes: 3f2ed8134834 ("tools: PCI: Add a userspace tool to test PCI endpoint")
> > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ