diff mbox

[xfstests-bld] android-xfstests: mount /dev/pts in chroot

Message ID 20170908235647.67225-1-ebiggers3@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eric Biggers Sept. 8, 2017, 11:56 p.m. UTC
From: Eric Biggers <ebiggers@google.com>

Since the upgrade of the chroot tarball to Debian Stretch, it's now
expected that devpts be mounted in the chroot.  Otherwise there is a
warning message like the following when the shell starts:

    mesg: ttyname failed: Success

Android mounts devpts already, so just bind-mount it into the chroot.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 kvm-xfstests/android-xfstests | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/kvm-xfstests/android-xfstests b/kvm-xfstests/android-xfstests
index 8e5b77c..e204e2f 100755
--- a/kvm-xfstests/android-xfstests
+++ b/kvm-xfstests/android-xfstests
@@ -227,6 +227,7 @@  chroot_prepare()
 ! mountpoint $CHROOT_DIR/sys > /dev/null && mount sysfs -t sysfs $CHROOT_DIR/sys
 ! mountpoint $CHROOT_DIR/proc > /dev/null && mount proc -t proc $CHROOT_DIR/proc
 ! mountpoint $CHROOT_DIR/dev > /dev/null && mount --bind /dev $CHROOT_DIR/dev
+! mountpoint $CHROOT_DIR/dev/pts > /dev/null && mount --bind /dev/pts $CHROOT_DIR/dev/pts
 
 # Allow xfstests to detect that SELinux is in use.
 ! mountpoint $CHROOT_DIR/sys/fs/selinux > /dev/null && \
@@ -258,6 +259,7 @@  chroot_wipe()
 umount $CHROOT_DIR/sys/fs/selinux &> /dev/null
 umount $CHROOT_DIR/sys &> /dev/null
 umount $CHROOT_DIR/proc &> /dev/null
+umount $CHROOT_DIR/dev/pts &> /dev/null
 umount $CHROOT_DIR/dev &> /dev/null
 umount $CHROOT_DIR/results &> /dev/null
 rm -rf $CHROOT_DIR