Attention is currently required from: Thomas Heijligen, Anastasia Klimchuk.
4 comments:
Commit Message:
Patch Set #6, Line 9: atexit
missing space: atexit -> at exit
atexit is the name of the functionality through which code coverage writes data to disk. I will reword it.
File tests/io_mock.h:
Patch Set #6, Line 110: size_t (*iom_fwrite)(void *state, const void *buf, size_t size, size_t len, FILE *fp);
Adding these (iom_fwrite and iom_fdopen) two can go into a separate patch, together with their calls […]
Done
File tests/tests.c:
Patch Set #6, Line 52: real_io_mock
I think you can drop _mock, this is just real_io
Done
static int unwrap_open(void *state, const char *pathname, int flags, mode_t mode)
{
LOG_ME;
(void)state;
return __real_open(pathname, flags, mode);
}
static FILE *unwrap_fdopen(void *state, int fd, const char *mode)
{
LOG_ME;
(void)state;
return __real_fdopen(fd, mode);
}
static size_t unwrap_fwrite(void *state, const void *ptr, size_t size, size_t nmemb, FILE *fp)
{
LOG_ME;
(void)state;
return __real_fwrite(ptr, size, nmemb, fp);
}
// Mock ios that defer to the real io functions.
// These exist so that code coverage can print to real files on disk.
static const struct io_mock real_io_mock = {
.iom_open = unwrap_open,
.iom_fwrite = unwrap_fwrite,
.iom_fdopen = unwrap_fdopen,
};
Ideally, if this could go to a separate file for example `coverage. […]
named it unmock_io as its what it does, I think it will be useful for more than just coverage.
To view, visit change 69266. To unsubscribe, or for help writing mail filters, visit settings.