Fix return EXIT_FAILURE if ballot or anyall fails

This commit is contained in:
Aaron Enye Shi
2018-07-24 20:39:48 +00:00
parent cab5e80b22
commit 8ab8a37812
2 changed files with 9 additions and 3 deletions
+6 -2
View File
@@ -96,13 +96,17 @@ int main(int argc, char* argv[]) {
#if defined(__HIP_PLATFORM_HCC__) && !defined(NVCC_COMPAT)
if (anycount == 1 && allcount == 1)
printf("PASSED\n");
else
else {
printf("FAILED\n");
return EXIT_FAILURE;
}
#else
if (anycount == 0 && allcount == 1)
printf("PASSED\n");
else
else {
printf("FAILED\n");
return EXIT_FAILURE;
}
#endif
return EXIT_SUCCESS;
+3 -1
View File
@@ -89,7 +89,9 @@ int main(int argc, char* argv[]) {
if (divergent_count == 1)
printf("PASSED\n");
else
else {
printf("FAILED\n");
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}