Commit b71f0a0b authored by Jean-Jacques Hiblot's avatar Jean-Jacques Hiblot Committed by Lorenzo Pieralisi

tools: PCI: Exit with error code when test fails

This makes it easier to use pcitest in automated setups.
Signed-off-by: default avatarJean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
parent 9e98c678
...@@ -140,6 +140,7 @@ static void run_test(struct pci_test *test) ...@@ -140,6 +140,7 @@ static void run_test(struct pci_test *test)
} }
fflush(stdout); fflush(stdout);
return (ret < 0) ? ret : 1 - ret; /* return 0 if test succeeded */
} }
int main(int argc, char **argv) int main(int argc, char **argv)
...@@ -228,6 +229,5 @@ int main(int argc, char **argv) ...@@ -228,6 +229,5 @@ int main(int argc, char **argv)
return -EINVAL; return -EINVAL;
} }
run_test(test); return run_test(test);
return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment