Parcourir la source

tests/common/helper.h: on failure, call STARPU_ASSERT to generate a core file

Nathalie Furmento il y a 14 ans
Parent
commit
93d547067e
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      tests/common/helper.h

+ 1 - 1
tests/common/helper.h

@@ -23,7 +23,7 @@
 //
 //#define STARPU_CHECK_MALLOC(ptr) {if (!ptr) { fprintf(stderr, "starpu_malloc failed\n"); return 1; }}
 //#define STARPU_CHECK_MALLOC_HAS_FAILED(ptr) {if (ptr) { fprintf(stderr, "starpu_malloc should have failed\n"); return 1; }}
-#define STARPU_CHECK_RETURN_VALUE(err, message) {if (err < 0) { perror(message); return 1; }}
+#define STARPU_CHECK_RETURN_VALUE(err, message) {if (err < 0) { perror(message); STARPU_ASSERT(0); }}
 #define STARPU_CHECK_RETURN_VALUE_IS(err, value, message) {if (err != value) { perror(message); return 1; }}
 //
 //#define STARPU_CHECK_MALLOC_THREAD(ptr) {if (!ptr) { fprintf(stderr, "starpu_malloc failed\n"); return ALL_IS_NOT_OK; }}