[PATCH] D56136: [compiler-rt] [sanitizer_common] Add tests for more stdio.h functions
Michał Górny via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Dec 29 01:00:17 PST 2018
mgorny marked 4 inline comments as done.
mgorny added inline comments.
================
Comment at: test/sanitizer_common/TestCases/Posix/feof_fileno_ferror.cc:49
+
+ fclose(fp);
+ return 0;
----------------
vitalybuka wrote:
> 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));
> ```
>
Will do. I've copied this from `fgets.cc`, `fputs_puts.cc` tests, and wrongly presumed it's expected coding style.
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