Browse Source

tests/: on enodev errors, tests are marked as skipped

Nathalie Furmento 14 years ago
parent
commit
0b2f6a8c1c

+ 1 - 1
tests/core/execute_on_a_specific_worker.c

@@ -130,5 +130,5 @@ enodev:
 	fprintf(stderr, "WARNING: No one can execute this task\n");
 	/* yes, we do not perform the computation but we did detect that no one
  	 * could perform the kernel, so this is not an error from StarPU */
-	return 0;
+	return 77;
 }

+ 14 - 6
tests/core/insert_task.c

@@ -39,7 +39,7 @@ starpu_codelet mycodelet = {
 int main(int argc, char **argv)
 {
         int x; float f;
-        int i;
+        int i, ret;
 	int ifactor=12;
 	float ffactor=10.0;
         starpu_data_handle data_handles[2];
@@ -53,11 +53,13 @@ int main(int argc, char **argv)
 
         FPRINTF(stderr, "VALUES: %d (%d) %f (%f)\n", x, ifactor, f, ffactor);
 
-        starpu_insert_task(&mycodelet,
-			   STARPU_VALUE, &ifactor, sizeof(ifactor),
-			   STARPU_VALUE, &ffactor, sizeof(ffactor),
-                           STARPU_RW, data_handles[0], STARPU_RW, data_handles[1],
-                           0);
+        ret = starpu_insert_task(&mycodelet,
+				 STARPU_VALUE, &ifactor, sizeof(ifactor),
+				 STARPU_VALUE, &ffactor, sizeof(ffactor),
+				 STARPU_RW, data_handles[0], STARPU_RW, data_handles[1],
+				 0);
+	if (ret == -ENODEV) goto enodev;
+
         starpu_task_wait_for_all();
 
         for(i=0 ; i<2 ; i++) {
@@ -93,4 +95,10 @@ int main(int argc, char **argv)
 	starpu_shutdown();
 
 	return 0;
+
+enodev:
+	fprintf(stderr, "WARNING: No one can execute this task\n");
+	/* yes, we do not perform the computation but we did detect that no one
+ 	 * could perform the kernel, so this is not an error from StarPU */
+	return 77;
 }

+ 1 - 1
tests/datawizard/critical_section_with_void_interface.c

@@ -76,5 +76,5 @@ enodev:
 	fprintf(stderr, "WARNING: No one can execute this task\n");
 	/* yes, we do not perform the computation but we did detect that no one
  	 * could perform the kernel, so this is not an error from StarPU */
-	return 0;
+	return 77;
 }

+ 1 - 1
tests/datawizard/data_invalidation.c

@@ -143,5 +143,5 @@ enodev:
 	fprintf(stderr, "WARNING: No one can execute this task\n");
 	/* yes, we do not perform the computation but we did detect that no one
  	 * could perform the kernel, so this is not an error from StarPU */
-	return 0;
+	return 77;
 }

+ 1 - 1
tests/datawizard/dsm_stress.c

@@ -132,5 +132,5 @@ enodev:
 	fprintf(stderr, "WARNING: No one can execute this task\n");
 	/* yes, we do not perform the computation but we did detect that no one
  	 * could perform the kernel, so this is not an error from StarPU */
-	return 0;
+	return 77;
 }

+ 1 - 1
tests/datawizard/sync_and_notify_data.c

@@ -189,5 +189,5 @@ enodev:
 	fprintf(stderr, "WARNING: No one can execute this task\n");
 	/* yes, we do not perform the computation but we did detect that no one
  	 * could perform the kernel, so this is not an error from StarPU */
-	return 0;
+	return 77;
 }

+ 1 - 1
tests/datawizard/sync_and_notify_data_implicit.c

@@ -187,5 +187,5 @@ enodev:
 	fprintf(stderr, "WARNING: No one can execute this task\n");
 	/* yes, we do not perform the computation but we did detect that no one
  	 * could perform the kernel, so this is not an error from StarPU */
-	return 0;
+	return 77;
 }

+ 2 - 2
tests/datawizard/unpartition.c

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2010  Université de Bordeaux 1
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -115,5 +115,5 @@ enodev:
 	fprintf(stderr, "WARNING: No one can execute this task\n");
 	/* yes, we do not perform the computation but we did detect that no one
  	 * could perform the kernel, so this is not an error from StarPU */
-	return 0;
+	return 77;
 }

+ 2 - 2
tests/datawizard/write_only_tmp_buffer.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010  Université de Bordeaux 1
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -134,5 +134,5 @@ enodev:
 	fprintf(stderr, "WARNING: No one can execute this task\n");
 	/* yes, we do not perform the computation but we did detect that no one
  	 * could perform the kernel, so this is not an error from StarPU */
-	return 0;
+	return 77;
 }

+ 2 - 2
tests/errorcheck/invalid_blocking_calls.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010  Université de Bordeaux 1
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -106,5 +106,5 @@ enodev:
 	fprintf(stderr, "WARNING: No one can execute this task\n");
 	/* yes, we do not perform the computation but we did detect that no one
 	 * could perform the kernel, so this is not an error from StarPU */
-	return 0;
+	return 77;
 }

+ 1 - 1
tests/microbenchs/prefetch_data_on_node.c

@@ -137,5 +137,5 @@ enodev:
 	fprintf(stderr, "WARNING: No one can execute this task\n");
 	/* yes, we do not perform the computation but we did detect that no one
  	 * could perform the kernel, so this is not an error from StarPU */
-	return 0;
+	return 77;
 }

+ 2 - 2
tests/microbenchs/redundant_buffer.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010  Université de Bordeaux 1
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -84,5 +84,5 @@ enodev:
 	fprintf(stderr, "WARNING: No one can execute this task\n");
 	/* yes, we do not perform the computation but we did detect that no one
  	 * could perform the kernel, so this is not an error from StarPU */
-	return 0;
+	return 77;
 }

+ 1 - 1
tests/overlap/overlap.c

@@ -127,5 +127,5 @@ enodev:
 	fprintf(stderr, "WARNING: No one can execute this task\n");
 	/* yes, we do not perform the computation but we did detect that no one
  	 * could perform the kernel, so this is not an error from StarPU */
-	return 0;
+	return 77;
 }

+ 1 - 1
tests/parallel_tasks/explicit_combined_worker.c

@@ -104,5 +104,5 @@ enodev:
 	fprintf(stderr, "WARNING: No one can execute this task\n");
 	/* yes, we do not perform the computation but we did detect that no one
  	 * could perform the kernel, so this is not an error from StarPU */
-	return 0;
+	return 77;
 }

+ 1 - 1
tests/parallel_tasks/parallel_kernels.c

@@ -107,5 +107,5 @@ enodev:
 	fprintf(stderr, "WARNING: No one can execute this task\n");
 	/* yes, we do not perform the computation but we did detect that no one
  	 * could perform the kernel, so this is not an error from StarPU */
-	return 0;
+	return 77;
 }

+ 1 - 1
tests/parallel_tasks/parallel_kernels_spmd.c

@@ -109,5 +109,5 @@ enodev:
 	fprintf(stderr, "WARNING: No one can execute this task\n");
 	/* yes, we do not perform the computation but we did detect that no one
  	 * could perform the kernel, so this is not an error from StarPU */
-	return 0;
+	return 77;
 }

+ 1 - 1
tests/parallel_tasks/spmd_pgreedy.c

@@ -87,5 +87,5 @@ enodev:
 	fprintf(stderr, "WARNING: No one can execute this task\n");
 	/* yes, we do not perform the computation but we did detect that no one
  	 * could perform the kernel, so this is not an error from StarPU */
-	return 0;
+	return 77;
 }