FS-Tee Grate.#92
Conversation
|
should just be 'fs-tee' now |
rennergade
left a comment
There was a problem hiding this comment.
Left a handful of comments
2fa1bc0 to
c21ae45
Compare
|
Seems like theres a merge conflict. Some thoughts I have:
|
…es into tee-grate
…ths. 3. Map pipe/pipe2 fd pairs 4. Use rfind instead of find
|
@rennergade, addressed all these. Tests still pass too. Feel free to review again. |
|
Added a fdtables::close in the tee_close handler. Along with error checks before record_fd_pair and in the fork handler. |
| read_buf[n] = '\0'; | ||
| printf("read: %s", read_buf); | ||
|
|
||
| int dupfd = dup(fd); |
There was a problem hiding this comment.
The exerciser calls dup/dup2/dup3, but the test only checks that the target exits successfully. It does not assert that the secondary path saw successful mirrored results or that fs-tee-secondary.log has matching success values. That means the fd translation bug above can pass if the primary path works while secondary calls fail/log -1.
There was a problem hiding this comment.
Do you have any proposals on what a test for the secondary paths should look like? Those values are never really returned anywhere.
Checking the log file seems to be unreliable.
I don't think this is limited to dup* either, pretty much all the tests above are only checking to make sure the primary paths are not hampered.
rennergade
left a comment
There was a problem hiding this comment.
put in some comments related to the dup family and a small fix to the test runner that should make it more reliable.
No description provided.