-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[LibOS] Add stat()
and hstat()
callbacks to FIFOs
#1897
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: Intel) (waiting on @dimakuv)
libos/test/regression/mkfifo.c
line 23 at r1 (raw file):
} struct stat buf;
I really dislike having buf
and buffer
in a single function at the same time.
Suggestion:
struct stat stat_buf;
libos/test/regression/mkfifo.c
line 46 at r1 (raw file):
} struct stat buf;
ditto, OTOH, you already have a buffer which you could use here, why another one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 3 files reviewed, 2 unresolved discussions, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: Intel), "fixup! " found in commit messages' one-liners (waiting on @mkow)
libos/test/regression/mkfifo.c
line 23 at r1 (raw file):
Previously, mkow (Michał Kowalczyk) wrote…
I really dislike having
buf
andbuffer
in a single function at the same time.
Done.
libos/test/regression/mkfifo.c
line 46 at r1 (raw file):
Previously, mkow (Michał Kowalczyk) wrote…
ditto, OTOH, you already have a buffer which you could use here, why another one?
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, all discussions resolved, not enough approvals from maintainers (1 more required), "fixup! " found in commit messages' one-liners
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 3 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, all discussions resolved, "fixup! " found in commit messages' one-liners
Previously, FIFO pseudo-files (named pipes) did not have callbacks of `stat()` (used on FIFO filenames) and `hstat()` (used on FIFO handles/FDs). This breaks some apps that want to double-check that the file they have opened or want to open is a FIFO, using the `stat()` or `fstat()` syscalls. There was no good reason to skip those callbacks, so this commit adds their dummy implementations. Signed-off-by: Dmitrii Kuvaiskii <dmitrii.kuvaiskii@intel.com>
d19c34a
to
5169fdb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
Description of the changes
Previously, FIFO pseudo-files (named pipes) did not have callbacks of
stat()
(used on FIFO filenames) andhstat()
(used on FIFO handles/FDs). This breaks some apps that want to double-check that the file they have opened or want to open is a FIFO, using thestat()
orfstat()
syscalls. There was no good reason to skip those callbacks, so this commit adds their dummy implementations.Fixes #1896.
How to test this PR?
Added some sub-tests in LibOS, and activated
read03
in LTP.This change is