[xfstests-bld PATCH] android-xfstests: create /dev/fd on the Android device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Eric Biggers <ebiggers@xxxxxxxxxx>

In order for bash process substitution (the syntax like "<(list)" or
">(list)") to work, /dev/fd has to be a symlink to /proc/self/fd.
/dev/fd doesn't exist on Android, so create it if it's missing.

This fixes xfstest generic/576.

Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>
---
 kvm-xfstests/android-xfstests | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kvm-xfstests/android-xfstests b/kvm-xfstests/android-xfstests
index a8f9be9..7741162 100755
--- a/kvm-xfstests/android-xfstests
+++ b/kvm-xfstests/android-xfstests
@@ -244,6 +244,11 @@ if ! cut -d' ' -f2 /proc/mounts 2>/dev/null | grep -q '^$CHROOT_DIR/results$'; t
     mount --bind $RESULTS_DIR $CHROOT_DIR/results
 fi
 
+# /dev/fd needs to exist in order for bash process substitution to work.
+if [ ! -e /dev/fd ]; then
+	ln -s /proc/self/fd /dev/fd
+fi
+
 # Android puts loopback device nodes in /dev/block/ instead of /dev/.
 # But losetup can only find them in /dev/, so create them there too.
 for i in \`seq 0 7\`; do
-- 
2.29.2




[Index of Archives]     [linux Cryptography]     [Asterisk App Development]     [PJ SIP]     [Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite News]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]

  Powered by Linux