[CRIU] [PATCH] tests: be extra defensive about /dev and /dev/pts
Tycho Andersen
tycho.andersen at canonical.com
Tue Feb 16 08:26:32 PST 2016
On Tue, Feb 16, 2016 at 07:21:04AM -0700, Tycho Andersen wrote:
> On Fri, Feb 12, 2016 at 05:49:58PM +0300, Pavel Emelyanov wrote:
> >
> > > diff --git a/test/zdtm/lib/ns.c b/test/zdtm/lib/ns.c
> > > index bc5c395..812872a 100644
> > > --- a/test/zdtm/lib/ns.c
> > > +++ b/test/zdtm/lib/ns.c
> > > @@ -93,6 +93,21 @@ static int prepare_mntns(void)
> > > return -1;
> > > }
> > >
> > > + if (mkdir("/dev", 0777) && errno != EEXIST) {
> > > + fprintf(stderr, "mkdir(/dev) failed: %m\n");
> > > + return -1;
> > > + }
> > > +
> > > + if (mount("devtmpfs", "/dev", "devtmpfs", 0, NULL)) {
> > > + fprintf(stderr, "mount(/dev) failed: %m\n");
> > > + return -1;
> > > + }
> >
> > The /dev is populated in zdtm.py's __construct_root, this mount would just ruin
> > the whole thing.
> >
> > Did you manage to find out why /dev gets killed during tests?
>
> Hmm, no, I missed that somehow. I wonder what did cause these... Does
> /dev automatically come with a /dev/pts directory too?
Never mind, I just sent out a set that fixes this and another problem.
Tycho
More information about the CRIU
mailing list