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

Pavel Emelyanov xemul at parallels.com
Tue Oct 2 15:08:24 EDT 2012


On 10/02/2012 11:01 PM, Cyrill Gorcunov wrote:
> 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;
> +		}
>  		if (mkdir("/dev/pts", 0755) && errno != EEXIST) {
>  			fprintf(stderr, "mkdir(/dev/pts) failed: %m\n");
>  			return -1;
> 


Applied


More information about the CRIU mailing list