[CRIU] [PATCH 15/15] test: pty05 -- Add testing of multiple devpts instance

Cyrill Gorcunov gorcunov at gmail.com
Wed Sep 26 23:57:28 MSK 2018


On Wed, Sep 26, 2018 at 07:22:57PM +0000, Andrey Vagin wrote:
...
> > +
> > +	snprintf(path, sizeof(path), "%s/%s", dirname, "lvl2");
> > +	dir2 = strdup(path);
> > +	if (!dir2 || mkdir(path, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH)) {
> > +		umount2(dir1, MNT_DETACH);
> > +		pr_perror("Can't create testing directory %s", path);
> > +		exit(1);
> > +	}
> > +	test_msg("Mounting second devpts at %s\n", dir2);
> > +	if (mount("devpts", path, "devpts", 0, "newinstance,ptmxmode=0666")) {
> 
> the newinstance option was deproicated in the kernel

It is left for backward compatibility, so should not be a problem

static const match_table_t tokens = {
	{Opt_uid, "uid=%u"},
	{Opt_gid, "gid=%u"},
	{Opt_mode, "mode=%o"},
	{Opt_ptmxmode, "ptmxmode=%o"},
	{Opt_newinstance, "newinstance"},
	{Opt_max, "max=%d"},
	{Opt_err, NULL}
};

but surely I can drop it

	Cyrill


More information about the CRIU mailing list