tsan: work around FileCheck feature that it does not accept empty input

llvm-svn: 171034
This commit is contained in:
Dmitry Vyukov 2012-12-24 14:02:34 +00:00
parent f6d8021520
commit 19969e5045
12 changed files with 11 additions and 4 deletions

View File

@ -25,6 +25,7 @@ int main() {
pthread_create(&t[1], NULL, Thread2, NULL);
pthread_join(t[0], NULL);
pthread_join(t[1], NULL);
printf("OK\n");
}
// CHECK-NOT: WARNING: ThreadSanitizer: data race

View File

@ -28,6 +28,7 @@ int main() {
pthread_create(&t[1], NULL, Thread2, NULL);
pthread_join(t[0], NULL);
pthread_join(t[1], NULL);
printf("OK\n");
}
// CHECK-NOT: WARNING: ThreadSanitizer: data race

View File

@ -27,6 +27,7 @@ int main() {
pthread_create(&t[1], NULL, Thread2, NULL);
pthread_join(t[0], NULL);
pthread_join(t[1], NULL);
printf("OK\n");
}
// CHECK-NOT: WARNING: ThreadSanitizer: data race

View File

@ -38,6 +38,7 @@ int main() {
pthread_join(t, 0);
close(c);
close(s);
printf("OK\n");
}
// CHECK-NOT: WARNING: ThreadSanitizer: data race

View File

@ -45,6 +45,7 @@ int main() {
close(c);
close(s);
pthread_join(t, 0);
printf("OK\n");
}
// CHECK-NOT: WARNING: ThreadSanitizer: data race

View File

@ -31,6 +31,7 @@ int main() {
pthread_create(&t[1], NULL, Thread2, NULL);
pthread_join(t[0], NULL);
pthread_join(t[1], NULL);
printf("OK\n");
}
// CHECK-NOT: WARNING: ThreadSanitizer: data race

View File

@ -25,7 +25,7 @@ int main() {
sleep(1);
Global = 43;
pthread_join(t, 0);
return 0;
printf("OK\n");
}
// CHECK-NOT: WARNING: ThreadSanitizer: data race

View File

@ -25,6 +25,7 @@ int main() {
pthread_create(&th, 0, Thread, (void*)(jheap + kHeapSize / 4));
stress(jheap);
pthread_join(th, 0);
printf("OK\n");
return __tsan_java_fini();
}

View File

@ -26,6 +26,7 @@ int main() {
__tsan_java_mutex_unlock(lockaddr);
pthread_join(th, 0);
__tsan_java_free((jptr)jheap, kBlockSize);
printf("OK\n");
return __tsan_java_fini();
}

View File

@ -33,6 +33,7 @@ int main() {
__tsan_java_move(varaddr, varaddr2, kBlockSize);
pthread_join(th, 0);
__tsan_java_free(varaddr2, kBlockSize);
printf("OK\n");
return __tsan_java_fini();
}

View File

@ -26,6 +26,7 @@ int main() {
__tsan_java_mutex_unlock(lockaddr);
pthread_join(th, 0);
__tsan_java_free((jptr)jheap, kBlockSize);
printf("OK\n");
return __tsan_java_fini();
}

View File

@ -22,9 +22,6 @@ test_file() {
$COMPILER $SRC $CFLAGS -c -o $OBJ
$COMPILER $OBJ $LDFLAGS -o $EXE
RES=$($EXE 2>&1 || true)
if [ "$3" != "" ]; then
printf "%s\n" "$RES"
fi
printf "%s\n" "$RES" | FileCheck $SRC
if [ "$3" == "" ]; then
rm -f $EXE $OBJ