[CRIU] Re: [PATCH] zdtm: Don't forget to create /dev/ptmx in new root

Cyrill Gorcunov gorcunov at openvz.org
Tue Oct 2 15:40:12 EDT 2012


On Tue, Oct 02, 2012 at 11:35:42PM +0400, Andrey Wagin wrote:
> 2012/10/2 Cyrill Gorcunov <gorcunov at openvz.org>:
> > Otherwise pty tests might fault.
> >
> > Reported-by: Pavel Emelyanov <xemul at parallels.com>
> > Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> > ---
> >  test/zdtm/lib/ns.c |    4 ++++
> >  1 files changed, 4 insertions(+), 0 deletions(-)
> >
> > diff --git a/test/zdtm/lib/ns.c b/test/zdtm/lib/ns.c
> > index 4349c3b..a90b0a0 100644
> > --- a/test/zdtm/lib/ns.c
> > +++ b/test/zdtm/lib/ns.c
> > @@ -62,6 +62,10 @@ static int prepare_mntns()
> >                         fprintf(stderr, "mkdir(/dev) failed: %m\n");
> >                         return -1;
> >                 }
> > +               if (mknod("/dev/ptmx", 0666 | S_IFCHR, makedev(5, 2)) && errno != EEXIST) {
> > +                       fprintf(stderr, "mknod(/dev/ptmx) failed: %m\n");
> > +                       return -1;
> > +               }
> 
> Why do you not want to fix tests, that /dev/pty/ptms is used. It will
> be useful, when devpts is mounted with the option newinstance.

This doesn't mean we shouldn't create /dev/ptmx as well. I've it in
my TODO list.


More information about the CRIU mailing list