[PATCH] D56136: [compiler-rt] [sanitizer_common] Add tests for more stdio.h functions

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 28 13:42:53 PST 2018


vitalybuka added inline comments.


================
Comment at: test/sanitizer_common/TestCases/Posix/feof_fileno_ferror.cc:49
+
+  fclose(fp);
+  return 0;
----------------
why does this close file only on success?
I assume normal test behavior is return 0;
So please replace all return N with  asserts so when it fail we will have verbose output
e.g
```
assert(close(fd) != -1);
....
assert(ferror(fp));
```



Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56136/new/

https://reviews.llvm.org/D56136





More information about the llvm-commits mailing list