From 2b73bccbefc2113083c7c4cfa0224cc7a76a2200 Mon Sep 17 00:00:00 2001 From: Aaron Enye Shi Date: Tue, 24 Jul 2018 20:39:48 +0000 Subject: [PATCH] Fix return EXIT_FAILURE if ballot or anyall fails --- tests/src/deviceLib/hip_anyall.cpp | 8 ++++++-- tests/src/deviceLib/hip_ballot.cpp | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/src/deviceLib/hip_anyall.cpp b/tests/src/deviceLib/hip_anyall.cpp index b4c747b7d7..21ad9f871c 100644 --- a/tests/src/deviceLib/hip_anyall.cpp +++ b/tests/src/deviceLib/hip_anyall.cpp @@ -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; diff --git a/tests/src/deviceLib/hip_ballot.cpp b/tests/src/deviceLib/hip_ballot.cpp index 46654d15a3..603614b22f 100644 --- a/tests/src/deviceLib/hip_ballot.cpp +++ b/tests/src/deviceLib/hip_ballot.cpp @@ -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; }