Skip to contentSkip to conversation

android-xfstests: mount /dev/pts in chroot

PATCH New Eric Biggers 1 participant 1 message Sep 8, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 android-xfstests: mount /dev/pts in chroot

From: Eric Biggers <[email protected]>

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.

---
 kvm-xfstests/android-xfstests | 2 ++
 1 file changed, 2 insertions(+)
kvm-xfstests/android-xfstests +2 -0
index 8e5b77c..e204e2f 100755
@@ -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
Signature · 1 line
2.14.1.581.gf28d330327-goog