Attention is currently required from: Anastasia Klimchuk.
4 comments:
File tests/io_mock.h:
Patch Set #4, Line 37: #include <fcntl.h>
Is this a platform-specific header? Is this header present on non-Linux environments? The unit tests […]
this one is posix, and posix says: `The <fcntl.h> header shall define the mode_t`
Not sure if we need to support non-posix, or what we can do if so.
File tests/tests.c:
Patch Set #4, Line 21: #include <fcntl.h>
If you need to include the same header twice, this means it needs to be included on a higher level, […]
Done
mode_t mode = 0;
if (flags & O_CREAT) {
va_list ap;
va_start(ap, flags);
mode = va_arg(ap, mode_t);
va_end(ap);
}
This code repeats for all variants of open wraps, can this code go to mock_open?
It has to be in the varargs function. On the other hand, I don't know the reason for the open64 and open64_2 functions, so maybe they can be removed?
File tests/wraps.h:
int __wrap_open(const char *pathname, int flags, ...);
int __wrap_open64(const char *pathname, int flags, ...);
int __wrap___open64_2(const char *pathname, int flags, ...);
Just to check, will the wraps still capture two-args variant of `open` calls?
yes, at link time there is no information about function type, only the name. This just tells the current translation unit that this is a vararg function.
To view, visit change 69263. To unsubscribe, or for help writing mail filters, visit settings.