Commit 79d00c29 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

zdtm: Don't forget to create /dev/ptmx in new root

Otherwise pty tests might fault.
Reported-by: 's avatarPavel Emelyanov <xemul@parallels.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent c6e0a402
...@@ -62,6 +62,10 @@ static int prepare_mntns() ...@@ -62,6 +62,10 @@ static int prepare_mntns()
fprintf(stderr, "mkdir(/dev) failed: %m\n"); fprintf(stderr, "mkdir(/dev) failed: %m\n");
return -1; 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) { if (mkdir("/dev/pts", 0755) && errno != EEXIST) {
fprintf(stderr, "mkdir(/dev/pts) failed: %m\n"); fprintf(stderr, "mkdir(/dev/pts) failed: %m\n");
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment