[CRIU] [PATCH 3/3] test: zdtm -- Add proc-self test
Cyrill Gorcunov
gorcunov at openvz.org
Mon Apr 29 17:03:51 EDT 2013
On Tue, Apr 30, 2013 at 12:48:47AM +0400, Andrew Vagin wrote:
> This test case should be added in the test list for regular execution.
> Look at zdtm.sh
>
> Do you try to execute zdtm.sh ns/static/proc-self?
Sure, it works well. Andrew, I want to make some improved version.
so this series is rfc for now, not to merge.
> > +
> > +int read_fd_link(int lfd, char *buf, size_t size)
> > +{
> > + ssize_t ret;
> > + char t[32];
> > +
> > + snprintf(t, sizeof(t), "/proc/self/fd/%d", lfd);
> > + ret = readlink(t, buf, size);
>
> size -1, the last one is used for a null byte.
yup, thanks!
Cyrill
More information about the CRIU
mailing list