Browse Source

Return EXIT_SUCCESS upon success, EXIT_FAILURE upon FAILURE, do not crash.

Cyril Roelandt 13 years ago
parent
commit
cf02debf48
1 changed files with 4 additions and 3 deletions
  1. 4 3
      tests/datawizard/manual_reduction.c

+ 4 - 3
tests/datawizard/manual_reduction.c

@@ -230,11 +230,12 @@ int main(int argc, char **argv)
 	for (worker = 0; worker < nworkers; worker++)
 	for (worker = 0; worker < nworkers; worker++)
 		starpu_data_unregister_no_coherency(per_worker_handle[worker]);
 		starpu_data_unregister_no_coherency(per_worker_handle[worker]);
 
 
-	STARPU_ASSERT(variable == (INIT_VALUE + NTASKS));
-
 	starpu_shutdown();
 	starpu_shutdown();
 
 
-	return EXIT_SUCCESS;
+	if (variable == INIT_VALUE + NTASKS)
+		return EXIT_SUCCESS;
+	else
+		return EXIT_FAILURE;
 
 
 enodev:
 enodev:
 	fprintf(stderr, "WARNING: No one can execute this task\n");
 	fprintf(stderr, "WARNING: No one can execute this task\n");