Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp699369rwe; Wed, 24 Aug 2022 07:43:18 -0700 (PDT) X-Google-Smtp-Source: AA6agR7/agdQUGyThZI5g37Ii48Y+YSdnnCCCd7VU48Swp3kKOYCWqUBJAmxb7gwf9qVW0Q0egFz X-Received: by 2002:a17:902:ec90:b0:16e:d8d8:c2db with SMTP id x16-20020a170902ec9000b0016ed8d8c2dbmr28880660plg.69.1661352198088; Wed, 24 Aug 2022 07:43:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661352198; cv=none; d=google.com; s=arc-20160816; b=NUCCClYpymNvtDvzTVCFh5X/Y2UqpgGN/p92Fq8vuCRBkUKBffIJnDSQS4oL/+ePRd s4uEfejgkbcgOoWQlKqD8ZPEILgLX9EZ9L6sY7HXEvTQ6zwXayCaRLJUWm6eeKXatjw7 yuHFppnde6H7T9lrjs0Ijs5MtxlbNltJ/u89DfRB2K85cOAGxqxdGFj6TYXFo+w7IVs7 phTnYuER1/sZ6KmPbgMWi7aAMjGnLZn8HElWniR+eGwZqRFt9iTKVttU9c2YZZ9r0OhI s2KU09QpL596KTIVEjTYUBaK0Kr5taN1cH9FRVJzXcUYvceGugdiJyB2LAPI0mTDsbuO RNrA== 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=VHZ1ksjQl5AvM5dtHsHT/yZDe5KV60+BqIyJVV5J5uo=; b=wB7Gs14WtkPeYo088njDwUNMzMNn6k2MTPqa+Q8iuNT10cSiwJ4FO5lUQ/sZUiN8j6 h+8qrXIp71nIcbTu0RIAVcNpBUORFjxsipI+ykUMMC03R7/IAqxXxwawebDeqzIef98f mPutp+lpkWa3YlwtlNrMFxmGgPtsL3epQIjS3zc1a8Es6EOwHoalT6YV4O0VYNg1CjdV NXIfv0W9zu51BVS4uBLVGrMH1HCuIGaTiaJQjTTedCMlrVaNQBL5p4uGLHIFqzZiE8yY jpzybUPVjW9b0mi8tUrKs7z5eJmCAXNQEPxKm7Q3ONqOJHO6foh9ix/XtJudrEiF9uxt 1Dxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RM+nfmA9; 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 be12-20020a656e4c000000b00419facbc543si19717470pgb.691.2022.08.24.07.43.06; Wed, 24 Aug 2022 07:43:18 -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=RM+nfmA9; 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 S238929AbiHXO2b (ORCPT + 99 others); Wed, 24 Aug 2022 10:28:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238114AbiHXO2a (ORCPT ); Wed, 24 Aug 2022 10:28:30 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 122E5564D2 for ; Wed, 24 Aug 2022 07:28:29 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id y141so16647301pfb.7 for ; Wed, 24 Aug 2022 07:28:29 -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; bh=VHZ1ksjQl5AvM5dtHsHT/yZDe5KV60+BqIyJVV5J5uo=; b=RM+nfmA9Bgeo4UxgaKhY2YaTFa7Uo1Xz7+8bvcx9KoPOgLoHj/kVqUxK88VBH6dVK8 ZrkROkaJlF736UWfTVb11bI1hRCtpEnjp/hCgxnM2OC7va6xnttCh6APsILSN2whjOWj CNd0wtoY9ZnEGxAVI+LeqkXnauvxYTaJbNqc62L1Vkzuw6+m9FMikDy6n4cWE7zHcpA4 Sh3oR0GArh+agB+sQr7Nr4Q43C9ZN5bxBkywRgPUs596aLCfC1lydvv+P5CR3Z2nGWXq FbklLVd96uhSUf3vYgMOx5uTxnOXQwszSRDfEalzBIdl8JNcljsLswKMMqd4ddfBnmME Pa0A== 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; bh=VHZ1ksjQl5AvM5dtHsHT/yZDe5KV60+BqIyJVV5J5uo=; b=QuYPFioa+B0muVDNehbT679gFjiF0ZKfRIymzV9OA4SK8eKDG566ko7SMcFiXiShG6 AT3XE/P6cRKlmkhSVjPms6BQa/+n7mJuHvfovkjBiiVGZcYZjy0REWgQqeWIvu201Q7H L/bCB87IgsgXOrYqMeHVgWpB8D9V2CqW7i456v2M+mK57HWW+MM4c/cCdzXy6g1CV0iQ n67NVVHmw7vKv3QGOfAazzNCyfGBzeS9gDjCfvr5MFlV8Wfb12frKVnwEg+agfItUC67 tNDl98j7+tyTVRt2VPPzHKhNmOAiTyMYouXCRDGeUkFzE/wT6PTxI9mp669TDQ6HO1pg 66nA== X-Gm-Message-State: ACgBeo3SW5k1E6avsgcnQGsHxLIFTRIba7XE7iHy9MMnra2n0adTcmfs aE1v7N0/+YsaG+sUdK6cDNDl X-Received: by 2002:aa7:88c3:0:b0:536:f035:ede0 with SMTP id k3-20020aa788c3000000b00536f035ede0mr8850989pff.74.1661351308433; Wed, 24 Aug 2022 07:28:28 -0700 (PDT) Received: from thinkpad ([117.207.24.28]) by smtp.gmail.com with ESMTPSA id n3-20020aa79843000000b005368341381fsm7305569pfq.106.2022.08.24.07.28.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 07:28:28 -0700 (PDT) Date: Wed, 24 Aug 2022 19:58:21 +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: <20220824142821.GC4767@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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 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, It is not following the TAP rules currently as I was not aware of it. Now that you pointed out, I'll try to adapt to it. Thanks, Mani > say that you are fixing that issue up in the changelog text. > > thanks, > > greg k-h -- மணிவண்ணன் சதாசிவம்