Commit f4ca362d authored by Florian Fischer's avatar Florian Fischer
Browse files

ReuseFutureTest: do not use an offset when writing to an eventfd

Eventfd's does not support seeking. This is also invalid code:

int main() {
    int64_t b = 42;
    int efd = eventfd(0, 0);
    if (efd < 0) err(EXIT_FAILURE, "creating eventfd failed");
    ssize_t res = pwrite(efd, &b, sizeof(b), 0);
    if (res != sizeof(b)) err(EXIT_FAILURE, "pwrite to evfd failed");
}
parent 94a00a78
......@@ -21,10 +21,10 @@ void emperTest() {
}
uint64_t read_buf;
ReadFuture read_future(efd, &read_buf, sizeof(read_buf), 0);
ReadFuture read_future(efd, &read_buf, sizeof(read_buf), -1);
uint64_t write_buf = 1;
WriteFuture write_future(efd, &write_buf, sizeof(write_buf), 0);
WriteFuture write_future(efd, &write_buf, sizeof(write_buf), -1);
const int ITERATIONS = 100;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment