浏览代码

tests: indicate errorcheck/invalid_blocking_calls.c is expected to fail

Nathalie Furmento 11 年之前
父节点
当前提交
461451be20
共有 2 个文件被更改,包括 8 次插入18 次删除
  1. 2 0
      tests/Makefile.am
  2. 6 18
      tests/errorcheck/invalid_blocking_calls.c

+ 2 - 0
tests/Makefile.am

@@ -103,6 +103,8 @@ if STARPU_COVERAGE_ENABLED
 TESTS	+=	coverage/coverage.sh
 endif
 
+XFAIL_TESTS=	errorcheck/invalid_blocking_calls
+
 noinst_PROGRAMS =				\
 	main/deprecated_func			\
 	main/deprecated_buffer			\

+ 6 - 18
tests/errorcheck/invalid_blocking_calls.c

@@ -28,17 +28,11 @@ void wrong_func(void *descr[], void *arg)
 {
 	STARPU_SKIP_IF_VALGRIND;
 
-	int ret;
-
+	/* The function is expected to fail. This is indicated in tests/Makefile.am */
 	/* try to fetch data in the RAM while we are in a codelet, such a
 	 * blocking call is forbidden */
-	ret = starpu_data_acquire(handle, STARPU_RW);
-	if (ret != -EDEADLK)
-		exit(-1);
-
-	ret = starpu_tag_wait(TAG);
-	if (ret != -EDEADLK)
-		exit(-1);
+	starpu_data_acquire(handle, STARPU_RW);
+	starpu_tag_wait(TAG);
 }
 
 static struct starpu_codelet wrong_codelet =
@@ -53,15 +47,9 @@ static struct starpu_codelet wrong_codelet =
 
 static void wrong_callback(void *arg)
 {
-	int ret;
-
-	ret  = starpu_data_acquire(handle, STARPU_RW);
-	if (ret != -EDEADLK)
-		exit(-1);
-
-	ret = starpu_tag_wait(TAG);
-	if (ret != -EDEADLK)
-		exit(-1);
+	/* The function is expected to fail. This is indicated in tests/Makefile.am */
+	starpu_data_acquire(handle, STARPU_RW);
+	starpu_tag_wait(TAG);
 }
 
 int main(int argc, char **argv)