diff options
author | Jean-Jacques Hiblot <jjhiblot@ti.com> | 2018-09-20 17:02:53 +0200 |
---|---|---|
committer | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2019-03-22 10:50:29 +0000 |
commit | b71f0a0b1e3fea212a6a5042ced8b48a81738ac9 (patch) | |
tree | c75879c2d643f6e8fb5f6886f674db544e605484 | |
parent | 9e98c678c2d6ae3a17cb2de55d17f69dddaa231b (diff) | |
download | linux-stable-b71f0a0b1e3fea212a6a5042ced8b48a81738ac9.tar.gz linux-stable-b71f0a0b1e3fea212a6a5042ced8b48a81738ac9.tar.bz2 linux-stable-b71f0a0b1e3fea212a6a5042ced8b48a81738ac9.zip |
tools: PCI: Exit with error code when test fails
This makes it easier to use pcitest in automated setups.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
-rw-r--r-- | tools/pci/pcitest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c index ec4d51f3308b..310a7e4850f6 100644 --- a/tools/pci/pcitest.c +++ b/tools/pci/pcitest.c @@ -140,6 +140,7 @@ static void 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) @@ -228,6 +229,5 @@ usage: return -EINVAL; } - run_test(test); - return 0; + return run_test(test); } |