[OpenMP][Tests][NFC] Actually check for test outcome
The CHECK: line in the test had no effect, because the test does not
pipe to FileCheck. Since the test only checks for a single value,
encode the result in the return value of the test.
GitOrigin-RevId: 3f229f42b796df33770184cdb9f2f4b5d15db796
diff --git a/runtime/test/tasking/detach_nested_task.c b/runtime/test/tasking/detach_nested_task.c
index bb08474..7ed65d4 100644
--- a/runtime/test/tasking/detach_nested_task.c
+++ b/runtime/test/tasking/detach_nested_task.c
@@ -15,6 +15,7 @@
#include <omp.h>
#include <stdio.h>
+#include "omp_my_sleep.h"
int *buf;
@@ -29,6 +30,7 @@
#pragma omp task firstprivate(event,i,j,n) shared(ret) default(none) depend(out:ret)
{
//printf("Task %i, %i: %i\n", i, j, omp_get_thread_num());
+ my_sleep(.01);
#pragma omp atomic
ret++;
#if _OPENMP
@@ -51,12 +53,11 @@
int main()
{
int ret;
-#pragma omp parallel
+#pragma omp parallel num_threads(4)
#pragma omp master
{
ret = foo(8);
}
printf("%i\n", ret);
- //CHECK: 64
- return 0;
+ return !(ret == 64);
}