From: Jean-Jacques Hiblot <jjhiblot@ti.com>
To: <kishon@ti.com>, <lorenzo.pieralisi@arm.com>,
<linux-pci@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, Jean-Jacques Hiblot <jjhiblot@ti.com>
Subject: [PATCH] tools: PCI: exit with error code when test fails
Date: Thu, 20 Sep 2018 17:02:53 +0200 [thread overview]
Message-ID: <1537455773-13470-1-git-send-email-jjhiblot@ti.com> (raw)
This makes it easier to use pcitest in automated setups.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
---
tools/pci/pcitest.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c
index af146bb..5adc8cd 100644
--- a/tools/pci/pcitest.c
+++ b/tools/pci/pcitest.c
@@ -143,6 +143,7 @@ static int run_test(struct pci_test *test)
}
fflush(stdout);
+ return (ret < 0) ? ret : 1 - ret; /* return 0 if test succeeded */
}
int main(int argc, char **argv)
@@ -231,6 +232,5 @@ int main(int argc, char **argv)
return -EINVAL;
}
- run_test(test);
- return 0;
+ return run_test(test);
}
--
2.7.4
next reply other threads:[~2018-09-20 15:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-20 15:02 Jean-Jacques Hiblot [this message]
2018-10-04 11:11 ` Lorenzo Pieralisi
2018-11-16 12:01 ` Lorenzo Pieralisi
2019-03-19 15:43 ` Lorenzo Pieralisi
2019-03-20 5:12 ` Kishon Vijay Abraham I
2019-03-22 11:06 ` Lorenzo Pieralisi
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=1537455773-13470-1-git-send-email-jjhiblot@ti.com \
--to=jjhiblot@ti.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
/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
all inboxes | Powered by JetHome®