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

Vitaly Buka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 28 13:42:54 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 cfe-commits mailing list