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>
This commit is contained in:
parent
9e98c678c2
commit
b71f0a0b1e
|
@ -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 @@ usage:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
run_test(test);
|
return run_test(test);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue