Failures in odp_term_local() or odp_term_global() are an indication
that the test did not correctly clean up after itself so should cause
the test to fail.

Signed-off-by: Stuart Haslam <[email protected]>
---
 test/validation/common/odp_cunit_common.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/test/validation/common/odp_cunit_common.c 
b/test/validation/common/odp_cunit_common.c
index 7359ce3..2af4410 100644
--- a/test/validation/common/odp_cunit_common.c
+++ b/test/validation/common/odp_cunit_common.c
@@ -83,8 +83,15 @@ int main(void)
        if (0 != tests_global_term())
                return -1;
 
-       odp_term_local();
-       odp_term_global();
+       if (0 != odp_term_local()) {
+               fprintf(stderr, "error: odp_term_local() failed.\n");
+               return -1;
+       }
+
+       if (0 != odp_term_global()) {
+               fprintf(stderr, "error: odp_term_global() failed.\n");
+               return -1;
+       }
 
        return (ret) ? -1 : 0;
 }
-- 
2.1.1

_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to